diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-09-03 22:42:12 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-09-03 22:42:12 +0000 |
| commit | 4b2cbddf2fdd394d4a91735237b266f9b026123c (patch) | |
| tree | 50f38c2ff67a761df787b518c104efa0069ddb71 /src/include | |
| parent | 233e3ccb96525e7a6af31a60b891badd8d73c5a4 (diff) | |
| download | skalibs-4b2cbddf2fdd394d4a91735237b266f9b026123c.tar.gz | |
Also fix fd_cat doc
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/skalibs/djbunix.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/include/skalibs/djbunix.h b/src/include/skalibs/djbunix.h index d6efa09..0bba29a 100644 --- a/src/include/skalibs/djbunix.h +++ b/src/include/skalibs/djbunix.h @@ -59,18 +59,23 @@ extern int openc_write (char const *) ; extern size_t path_canonicalize (char *, char const *, int) ; -extern pid_t wait_nointr (int *) ; +#define wait_status(w) (WIFSIGNALED(w) ? 256 + WTERMSIG(w) : WEXITSTATUS(w)) +#define wait_estatus(w) (WIFSIGNALED(w) ? 128 + WTERMSIG(w) : WEXITSTATUS(w) >= 128 ? 128 : WEXITSTATUS(w)) + +/* These do not reap unknown children */ extern pid_t waitpid_nointr (pid_t, int *, int) ; #define wait_pid(pid, wstat) waitpid_nointr(pid, (wstat), 0) #define waitpid_nohang(pid, wstat) waitpid_nointr(pid, (wstat), WNOHANG) +extern int waitpids_nohang (pid_t const *, size_t, int *, size_t *) ; +extern size_t waitpids (pid_t const *, size_t, int *) ; + +/* These reap unknown children */ +extern pid_t wait_nointr (int *) ; #define wait_nohang(wstat) waitpid_nohang(-1, (wstat)) extern pid_t wait_pid_nohang (pid_t, int *) ; extern int wait_pids_nohang (pid_t const *, unsigned int, int *) ; -extern int waitpids_nohang (pid_t const *, unsigned int, int *) ; - -#define wait_status(w) (WIFSIGNALED(w) ? 256 + WTERMSIG(w) : WEXITSTATUS(w)) -#define wait_estatus(w) (WIFSIGNALED(w) ? 128 + WTERMSIG(w) : WEXITSTATUS(w) >= 128 ? 128 : WEXITSTATUS(w)) +/* These will disappear or be refactored */ extern unsigned int wait_reap (void) ; extern int waitn (pid_t *, unsigned int) ; extern int waitn_posix (pid_t *, unsigned int, int *) ; |
