From a58812d5404844274298344babdb079e161d164f Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 16 Oct 2026 07:12:56 +0000 Subject: Prepare for 2.16.0.0, remove waitn*, change openslurpclose_at --- doc/index.html | 15 +++++++++-- doc/libstddjb/djbunix.html | 62 ++++++++++++++++++++++------------------------ doc/license.html | 2 +- doc/upgrade.html | 6 +++-- 4 files changed, 47 insertions(+), 38 deletions(-) (limited to 'doc') diff --git a/doc/index.html b/doc/index.html index 4980b35..1da38d9 100644 --- a/doc/index.html +++ b/doc/index.html @@ -61,8 +61,8 @@ with a standard C development environment

Download

+

Support this work

+ +

+ If you like this skarnet.org project, you can donate to the author via Liberapay, +by clicking the following button: + + +

+ diff --git a/doc/libstddjb/djbunix.html b/doc/libstddjb/djbunix.html index ba9e692..0850dd6 100644 --- a/doc/libstddjb/djbunix.html +++ b/doc/libstddjb/djbunix.html @@ -364,6 +364,8 @@ The child_spawn family of functions has been moved to the

Waiting for children

+

Including bastards (children a process doesn't know it has)

+

unsigned int wait_reap ()
Instantly reaps all the pending zombies, without blocking, without a look at @@ -371,36 +373,6 @@ the exit codes. Returns the number of reaped zombies.

-

- int waitn (pid_t *pids, unsigned int n)
-Waits until all processes whose PIDs are stored in the -pids array, of size n, have died. -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 -pids array, of size n. -Returns -1 (and sets errno) if it fails, and the number of reaped -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 @@ -448,15 +420,39 @@ function over the basic Unix APIs. This allows a program to:

+

Excluding bastards

+ +

+ size_t waitpids (pid_t const *pids, size_t n, int *wstat)
+Blockingly waits until it has reapt all the pids in array pids of +size n, or an error occurs; does not reap any zombie that is not +listed in pids. On success, it returns n. +On error, it returns an integer i lesser than n, which +is the position of the error in array pids, and sets errno. +All the pids before +pids[i] have been properly reapt, and *wstat +contains the status for the last reapt process, pids[i-1]. +

+ +

+ int waitpids_nohang (pid_t const *pids, size_t n, int *wstat, size_t *i)
+Instantly reaps one zombie among the pids listed in array pids of +size n. If an error occurs, returns -1, sets errno, and writes the +index (in the pids array) of the incriminated process in *i. +If it finds a zombie, it writes the index of the found and reapt process +in *i and returns 1. If no zombie is found in the list, it +returns 0. Any zombie not listed remains untouched. +

+

Reading and writing whole files

diff --git a/doc/license.html b/doc/license.html index e92da26..62cee6f 100644 --- a/doc/license.html +++ b/doc/license.html @@ -75,7 +75,7 @@ color, or different text font.

I am aware that the previous restrictions sound completely ridiculous while the official skalibs documentation is incomplete. -As of 2.15.2.0, I'm not going to enforce those restrictions, but if you're +As of 2.16.0.0, I'm not going to enforce those restrictions, but if you're going to provide documentation for skalibs, don't keep it to yourself, please send it to me instead. :-)

diff --git a/doc/upgrade.html b/doc/upgrade.html index 74e9776..3a429da 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -17,10 +17,12 @@ skarnet.org

-

in 2.15.2.0

+

in 2.16.0.0

in 2.15.1.0

-- cgit v1.3.1