nuttx/fs/inode
dongjiuzhu1 18819b6b24 sched/task: close file descriptor with O_CLOEXEC before active task or exec
VELAPLATFO-18473

refs:
https://man7.org/linux/man-pages/man2/fcntl.2.html
If the FD_CLOEXEC bit is set, the file descriptor will automatically
be closed during a successful execve(2).
(If the execve(2) fails, the file descriptor is left open.)

modify:
1. Ensure that the child task copies all fds of the parent task,
   including those with O_CLOEXE.
2. Make sure spawn_file_action is executed under fd with O_CLOEXEC,
   otherwise it will fail.
3. When a new task is activated or exec is called, close all fds
   with O_CLOEXEC flags.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-27 21:15:07 +08:00
..
CMakeLists.txt build: add initial cmake build system 2023-07-08 13:50:48 +08:00
fs_files.c sched/task: close file descriptor with O_CLOEXEC before active task or exec 2023-10-27 21:15:07 +08:00
fs_foreachinode.c mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
fs_inode.c Replace nxsem API when used as a lock with nxmutex API 2022-10-17 15:59:46 +09:00
fs_inodeaddref.c Replace nxsem API when used as a lock with nxmutex API 2022-10-17 15:59:46 +09:00
fs_inodebasename.c
fs_inodefind.c Replace nxsem API when used as a lock with nxmutex API 2022-10-17 15:59:46 +09:00
fs_inodefree.c
fs_inodegetpath.c fs/vfs: Add a new argument(size_t len) to inode_getpath 2023-05-08 09:57:01 +02:00
fs_inoderelease.c Replace nxsem API when used as a lock with nxmutex API 2022-10-17 15:59:46 +09:00
fs_inoderemove.c
fs_inodereserve.c mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
fs_inodesearch.c fs/inode: add missing FAR 2023-08-08 11:58:29 -03:00
inode.h fs: Change inode_checkflags to static function 2023-10-22 21:23:08 +03:00
Make.defs