incubator-nuttx/include
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
..
android
arpa
crypto crypto/rsa_verify: export rsa verify via /dev/crypto 2023-10-18 12:23:13 +08:00
cxx
net
netinet endian: Make all endian related functions use the expicit type 2023-10-20 09:46:21 +08:00
netpacket
nuttx sched/task: close file descriptor with O_CLOEXEC before active task or exec 2023-10-27 21:15:07 +08:00
ssp
sys endian: Make all endian related functions use the expicit type 2023-10-20 09:46:21 +08:00
.gitignore
aio.h aio: change aio_fildes int type 2023-09-08 00:59:31 +03:00
alloca.h libs/alloca: add alloca implement for MSVC 2023-08-28 11:10:08 -03:00
assert.h assert: rename __ASSERT to __ASSERT__ to avoid conflict 2023-10-26 16:21:02 +08:00
byteswap.h
ctype.h libs/ctype/toupper_l: Implement function toupper_l instead of macro 2023-08-22 00:07:16 +08:00
debug.h Add a stepper generic upperhalf driver 2023-10-14 12:28:41 -04:00
dirent.h
dlfcn.h
dsp.h libdsp: update LP_FILTER comment 2023-10-19 21:38:45 +08:00
dspb16.h libdsp: update LP_FILTER comment 2023-10-19 21:38:45 +08:00
elf.h
elf32.h
elf64.h Fix loading of ET_DYN type of shared objects 2023-09-20 09:35:28 -04:00
endian.h
err.h
errno.h
execinfo.h
fcntl.h
fixedmath.h fixedmath: add abs and sign operations 2023-10-07 21:25:56 +08:00
fnmatch.h
ftw.h
getopt.h
glob.h
grp.h
hex2bin.h
iconv.h
ifaddrs.h
inttypes.h
iso646.h
langinfo.h The character U+ff0c "," could be confused with the ASCII character U+002c ",", which is more common in source code. 2023-10-03 16:53:12 -04:00
libgen.h
libintl.h
limits.h clock: replace all up_perf_xx with perf_xx 2023-10-02 16:11:43 +02:00
locale.h
lzf.h
malloc.h libc/mallopt: implement dummy mallopt 2023-09-07 23:11:10 +08:00
mqueue.h
netdb.h
nl_types.h
nxflat.h
obstack.h
poll.h
pthread.h pthread_once: g_lock may lead deadlock 2023-09-26 10:13:00 +08:00
pty.h
pwd.h
regex.h
resolv.h
sched.h
semaphore.h
signal.h signal: add siginterrupt implementation 2023-08-29 09:43:42 +08:00
spawn.h
stdbool.h
stddef.h
stdint.h
stdio.h libc: add support for memory buffer stream with fmemopen() 2023-10-27 08:55:24 +08:00
stdlib.h
stdnoreturn.h
string.h
strings.h
syscall.h
syslog.h
termios.h
threads.h
time.h include: move clockid_t and time[r]_t define to sys/types.h 2023-08-19 09:08:40 +03:00
unistd.h fs/dup3: impletement dup3/nx_dup3_from_tcb function 2023-10-27 21:15:07 +08:00
utime.h
uuid.h
wchar.h libs/libc/wchar: add fputws implementation 2023-09-22 08:51:07 +08:00
wctype.h