nuttx/sched
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
..
addrenv cmake:complete missing changes during cmake reforming for sched 2023-09-08 21:20:16 +03:00
clock sched: fix the minor style issue 2023-10-25 15:46:45 +08:00
environ env_dup: fix issue about USE_AFTER_FREE 2023-10-26 00:11:14 +08:00
group sched: fix the minor style issue 2023-10-25 15:46:45 +08:00
init sched: Remove the unused tcb argument from group_setupidlefiles 2023-10-17 17:23:05 +03:00
irq spinlock: implement read writer spinlock 2023-10-16 08:55:01 +08:00
misc assert: move the backtrace dump after the stack dump 2023-10-16 16:07:44 +08:00
module libs/libc: fix compile warning about modlib_depend when CONFIG_MODLIB_MAXDEPEND = 0 2023-10-26 01:53:38 +08:00
mqueue mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
paging build: add initial cmake build system 2023-07-08 13:50:48 +08:00
pthread sched: fix the minor style issue 2023-10-25 15:46:45 +08:00
sched sched: Exit immediately when cpuset change to 0. 2023-10-18 21:12:35 +08:00
semaphore fix: Mac sim-02 compiler issue 2023-10-16 08:55:01 +08:00
signal signal: use work_cancel_sync() to fix used after free 2023-09-19 15:52:48 +08:00
task sched/task: close file descriptor with O_CLOEXEC before active task or exec 2023-10-27 21:15:07 +08:00
timer Replace enter_critical_section with spin_irqsave 2023-10-21 11:00:07 +08:00
tls libc: add support for custom streams with fopencookie() 2023-10-18 21:13:01 +08:00
wdog clock: replace all up_perf_xx with perf_xx 2023-10-02 16:11:43 +02:00
wqueue clock: replace all up_perf_xx with perf_xx 2023-10-02 16:11:43 +02:00
CMakeLists.txt build: add initial cmake build system 2023-07-08 13:50:48 +08:00
Kconfig sched: add smp function call 2023-10-18 09:57:50 +08:00
Makefile group/group_addrenv: Move address environment from group -> tcb 2023-02-08 02:51:23 +08:00