nuttx/libs/libc/unistd
Alan Carvalho de Assis 3cbf6f2168 libc: add wait4()
wait4() is BSD/Linux-standard (used by toybox's "time" applet) but NuttX
only had waitpid()+getrusage() separately. Add it to libs/libc/unistd/
built on top of those two existing primitives, so it needs no syscall
plumbing of its own and works unmodified across flat/protected/kernel
build separation. Prototype added to include/sys/wait.h.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 10:20:52 +08:00
..
CMakeLists.txt libc: add wait4() 2026-08-14 10:20:52 +08:00
Kconfig libc/unistd: move NAME_MAX/LINE_MAX/PATH_MAX define to unistd 2025-01-15 23:17:51 +08:00
lib_access.c libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
lib_alarm.c
lib_chdir.c libc/chdir: replace heap alloc to path buffer to improve performance 2024-12-11 20:33:34 +08:00
lib_confstr.c unistd: add support for confstr() 2025-08-22 20:50:13 +08:00
lib_crypt.c libs/libc/unistd: add crypt function 2024-10-16 11:15:25 +08:00
lib_crypt_r.c libs/libc/unistd:Fix errcode not return normally 2024-10-16 11:15:25 +08:00
lib_daemon.c
lib_execl.c
lib_execle.c
lib_execv.c
lib_fchdir.c libc/chdir: chdir/fchdir should not depend on environment variables 2024-12-11 00:34:25 +08:00
lib_fchownat.c Use lib_get_pathbuffer instead of stack variables 2024-11-12 17:21:42 +08:00
lib_flock.c
lib_fork.c !sched/arch/libc: Give fork() and vfork() their real, separate semantics. 2026-08-10 08:57:30 -03:00
lib_fstatvfs.c
lib_futimes.c
lib_getcwd.c nuttx: add get_current_dir_name implementation 2024-12-19 20:55:51 +08:00
lib_getegid.c
lib_getentropy.c libc: Refine the arc4random_buf implementation 2024-10-26 18:04:21 -03:00
lib_geteuid.c
lib_getgid.c
lib_getgroups.c sched: add supplementary group IDs (setgroups/getgroups/initgroups) 2026-08-12 16:06:03 -03:00
lib_gethostname.c libs/libc: replace critical section with spinlock in hostname operations 2026-01-17 14:13:07 +08:00
lib_getopt.c
lib_getopt_common.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
lib_getopt_long.c
lib_getopt_longonly.c
lib_getoptargp.c libc/unistd: fixed tasking build issue 2024-11-01 23:03:23 +08:00
lib_getopterrp.c libc/unistd: fixed tasking build issue 2024-11-01 23:03:23 +08:00
lib_getoptindp.c libc/unistd: fixed tasking build issue 2024-11-01 23:03:23 +08:00
lib_getoptoptp.c libc/unistd: fixed tasking build issue 2024-11-01 23:03:23 +08:00
lib_getoptvars.c style/FAR: remove FAR qualifier 2025-11-10 10:56:29 +01:00
lib_getpass.c libs/libc/unistd: add getpass function 2024-10-16 11:15:25 +08:00
lib_getpgid.c
lib_getpgrp.c
lib_getpriority.c
lib_getresgid.c sched/group: add getresuid, getresgid, setreuid, and setregid 2026-07-30 09:48:10 +08:00
lib_getresuid.c sched/group: add getresuid, getresgid, setreuid, and setregid 2026-07-30 09:48:10 +08:00
lib_getrlimit.c
lib_getrusage.c
lib_getsid.c drivers/serial: add job-control TTY ioctls and libc wrappers 2026-06-23 16:26:53 -03:00
lib_getuid.c
lib_issetugid.c fs/binfmt: close symlink TOCTOU and harden setuid/setgid exec hygiene 2026-08-01 15:32:03 -03:00
lib_linkat.c Use lib_get_pathbuffer instead of stack variables 2024-11-12 17:21:42 +08:00
lib_lockf.c
lib_lutimes.c
lib_nice.c
lib_pathconf.c fpathconf: add _POSIX_PRIO_IO defintion 2026-01-15 16:10:51 -03:00
lib_pipe.c libc/unistd: Replace pipe() macro with proper function implementation 2025-11-26 17:18:13 +08:00
lib_posix_fallocate.c
lib_readlinkat.c Use lib_get_pathbuffer instead of stack variables 2024-11-12 17:21:42 +08:00
lib_restoredir.c
lib_setegid.c
lib_seteuid.c
lib_setgid.c
lib_setgroups.c sched: add supplementary group IDs (setgroups/getgroups/initgroups) 2026-08-12 16:06:03 -03:00
lib_sethostname.c libs/libc: replace critical section with spinlock in hostname operations 2026-01-17 14:13:07 +08:00
lib_setpgid.c drivers/serial: add job-control TTY ioctls and libc wrappers 2026-06-23 16:26:53 -03:00
lib_setpriority.c
lib_setregid.c sched/group: add getresuid, getresgid, setreuid, and setregid 2026-07-30 09:48:10 +08:00
lib_setresgid.c sched: add setresuid and setresgid 2026-08-12 16:06:03 -03:00
lib_setresuid.c sched: add setresuid and setresgid 2026-08-12 16:06:03 -03:00
lib_setreuid.c sched/group: add getresuid, getresgid, setreuid, and setregid 2026-07-30 09:48:10 +08:00
lib_setrlimit.c
lib_setsid.c drivers/serial: add job-control TTY ioctls and libc wrappers 2026-06-23 16:26:53 -03:00
lib_setuid.c
lib_sleep.c
lib_statvfs.c
lib_swab.c
lib_symlinkat.c Use lib_get_pathbuffer instead of stack variables 2024-11-12 17:21:42 +08:00
lib_sysconf.c sched: add supplementary group IDs (setgroups/getgroups/initgroups) 2026-08-12 16:06:03 -03:00
lib_times.c
lib_truncate.c
lib_ulimit.c lib_ulimit: fix the variable uninit coverity issue 2026-01-16 10:03:53 +08:00
lib_unlinkat.c Use lib_get_pathbuffer instead of stack variables 2024-11-12 17:21:42 +08:00
lib_usleep.c
lib_utime.c
lib_utimes.c Use lib_get_pathbuffer instead of stack variables 2024-11-12 17:21:42 +08:00
lib_wait4.c libc: add wait4() 2026-08-14 10:20:52 +08:00
Make.defs libc: add wait4() 2026-08-14 10:20:52 +08:00
unistd.h