From 7d0199963a2ec019270ee187f8c9cb8adb25dac1 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 15 Apr 2022 06:30:46 +0000 Subject: Add waitn_posix() and waitn_reap_posix() Signed-off-by: Laurent Bercot --- doc/libstddjb/djbunix.html | 13 +++++++++++++ doc/upgrade.html | 2 ++ 2 files changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/libstddjb/djbunix.html b/doc/libstddjb/djbunix.html index 36de54b..d1470b4 100644 --- a/doc/libstddjb/djbunix.html +++ b/doc/libstddjb/djbunix.html @@ -421,6 +421,12 @@ Returns 1 if it succeeds, and 0 (and sets errno) if it fails. The pid array is not guaranteed to be unchanged.

+

+ int waitn_posix (pid_t *pids, unsigned int n, int *wstat)
+Like waitn, but stores into *wstat the status +of the last process in the pids array (i.e. pids[n-1]). +

+

int waitn_reap (pid_t *pids, unsigned int n)
Instantly reaps all zombies whose PIDs are stored in the @@ -430,6 +436,13 @@ zombies if it succeeds. The pid array is not guaranteed to be unchanged.

+

+ int waitn_reap_posix (pid_t *pids, unsigned int n, int *wstat)
+Like waitn_reap, but stores into *wstat the status +of the last process in the pids array (i.e. pids[n-1]), +if applicable; otherwise *wstat is unchanged. +

+

pid_t wait_nohang (int *wstat)
Instantly reaps one zombie, and stores the status information into diff --git a/doc/upgrade.html b/doc/upgrade.html index 9e6c272..4dff35b 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -25,6 +25,8 @@ as well as random_char().

  • random functions now have an early version, to use when randomness is required before the generator can be seeded (i.e. in programs running in the very early boot).
  • +
  • New djbunix functions: +waitn_posix(), waitn_reap_posix()
  • in 2.11.2.0

    -- cgit 1.4.1