incubator-nuttx/fs
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
..
aio fs/inode: remove all unnecessary check for filep/inode 2023-08-29 09:47:11 +08:00
binfs fs/inode: remove all unnecessary check for filep/inode 2023-08-29 09:47:11 +08:00
cromfs mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
driver fs/inode: remove all unnecessary check for filep/inode 2023-08-29 09:47:11 +08:00
fat mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
hostfs cmake:complete missing changes during cmake reforming for fs 2023-09-08 21:20:16 +03:00
inode sched/task: close file descriptor with O_CLOEXEC before active task or exec 2023-10-27 21:15:07 +08:00
littlefs cmake:complete missing changes during cmake reforming for fs 2023-09-08 21:20:16 +03:00
mmap nuttx/fs:remove (flags & MAP_PRIVATE) == 0. 2023-08-04 04:20:06 -07:00
mount fs:support zipfs,can mount zipfile 2023-09-27 01:06:04 +08:00
mqueue fs/mqueue: add missing FAR specifier 2023-09-16 14:17:47 +08:00
nfs mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
nxffs mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
partition nxstyle: cleanup UTF-8 Unicode to ASCII 2023-09-18 11:54:17 -04:00
procfs clock: replace all up_perf_xx with perf_xx 2023-10-02 16:11:43 +02:00
romfs inode/i_private: remove all unnecessary cast for i_private 2023-08-29 08:58:07 +02:00
rpmsgfs kernel: replace all usleep to nxsig_usleep in kernel space 2023-10-25 15:46:03 +08:00
semaphore fs/inode: remove all unnecessary check for filep/inode 2023-08-29 09:47:11 +08:00
shm cmake:complete missing changes during cmake reforming for fs 2023-09-08 21:20:16 +03:00
smartfs mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
socket build: add initial cmake build system 2023-07-08 13:50:48 +08:00
spiffs mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
tmpfs mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
unionfs inode/i_private: remove all unnecessary cast for i_private 2023-08-29 08:58:07 +02:00
userfs fs/inode: remove all unnecessary check for filep/inode 2023-08-29 09:47:11 +08:00
vfs fs/dup3: impletement dup3/nx_dup3_from_tcb function 2023-10-27 21:15:07 +08:00
zipfs fs:support zipfs,can mount zipfile 2023-09-27 01:06:04 +08:00
CMakeLists.txt build: add initial cmake build system 2023-07-08 13:50:48 +08:00
Kconfig fs:support zipfs,can mount zipfile 2023-09-27 01:06:04 +08:00
Makefile fs:support zipfs,can mount zipfile 2023-09-27 01:06:04 +08:00
fs_initialize.c add the startup process tracepoint 2023-08-19 21:50:08 +08:00