nuttx/binfmt
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
..
libelf libs/modlib: Adding architecture-specific memory allocator for dynamic data loading 2023-10-26 01:53:38 +08:00
libnxflat enable O_CLOEXEC explicit 2023-09-22 13:51:00 +08:00
binfmt_copyargv.c
binfmt_coredump.c
binfmt_dumpmodule.c
binfmt_exec.c sched/task_[posix]spawn: Simplify how spawn attributes are handled 2023-10-25 11:55:44 -03:00
binfmt_execmodule.c sched/task: close file descriptor with O_CLOEXEC before active task or exec 2023-10-27 21:15:07 +08:00
binfmt_execsymtab.c
binfmt_exit.c
binfmt_globals.c
binfmt_initialize.c
binfmt_loadmodule.c
binfmt_register.c
binfmt_unloadmodule.c
binfmt_unregister.c
binfmt.h
builtin.c
CMakeLists.txt Exec: Support run exec in current task 2023-09-20 16:53:30 +08:00
elf.c binfmt: ELF support load to LMA 2023-09-04 12:23:26 +08:00
Kconfig binfmt/elf: Select ARCH_USE_TEXT_HEAP if ARCH_HAVE_TEXT_HEAP 2023-10-27 15:42:02 +09:00
Makefile Exec: Support run exec in current task 2023-09-20 16:53:30 +08:00
nxflat.c