wait4(2) System Calls Manual wait4(2) wait3, wait4 - BSD (libc -lc) #include pid_t wait3(int *_Nullable wstatus, int options, struct rusage *_Nullable rusage); pid_t wait4(pid_t pid, int *_Nullable wstatus, int options, struct rusage *_Nullable rusage); glibc ( feature_test_macros(7)): wait3(): Since glibc 2.26: _DEFAULT_SOURCE || (_XOPEN_SOURCE >= 500 && ! (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600)) From glibc 2.19 to glibc 2.25: _DEFAULT_SOURCE || _XOPEN_SOURCE >= 500 glibc 2.19 and earlier: _BSD_SOURCE || _XOPEN_SOURCE >= 500 wait4(): glibc 2.19: _DEFAULT_SOURCE glibc 2.19 : _BSD_SOURCE waitpid(2) waitid(2). wait3() wait4() waitpid(2) rusage. rusage wait3() : wait3(wstatus, options, rusage); : waitpid(-1, wstatus, options); wait4() : wait4(pid, wstatus, options, rusage); : waitpid(pid, wstatus, options); wait3() wait4() . wait(2) . rusage NULL struct rusage . getrusage(2) . waitpid(2). waitpid(2). . 4.3BSD. SUSv1 wait3() SUSv2 wait3() LEGACY SUSv3. . ( rusage struct timeval .) C wait3() wait4(). fork(2), getrusage(2), sigaction(2), signal(2), wait(2), signal(7) 3 . . : . 6.18 8 2026 wait4(2)