diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-10-16 07:12:56 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-10-16 07:12:56 +0000 |
| commit | a58812d5404844274298344babdb079e161d164f (patch) | |
| tree | 09d55dceb8708d54e482acb0235358be287b989d /src/libstddjb/waitn_posix.c | |
| parent | b74ab967cf330f9c7dd17ffa12009926ace5a4bc (diff) | |
| download | skalibs-a58812d5404844274298344babdb079e161d164f.tar.gz | |
Prepare for 2.16.0.0, remove waitn*, change openslurpclose_at
Diffstat (limited to 'src/libstddjb/waitn_posix.c')
| -rw-r--r-- | src/libstddjb/waitn_posix.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/libstddjb/waitn_posix.c b/src/libstddjb/waitn_posix.c deleted file mode 100644 index ea5935d..0000000 --- a/src/libstddjb/waitn_posix.c +++ /dev/null @@ -1,21 +0,0 @@ -/* ISC license. */ - -#include <sys/wait.h> - -#include <skalibs/djbunix.h> - -int waitn_posix (pid_t *pids, unsigned int n, int *w) -{ - pid_t wanted = n ? pids[n-1] : 0 ; - while (n) - { - int wstat ; - unsigned int i = 0 ; - pid_t pid = wait_nointr(&wstat) ; - if (pid < 0) return 0 ; - for (; i < n ; i++) if (pid == pids[i]) break ; - if (i < n) pids[i] = pids[--n] ; - if (pid == wanted) *w = wstat ; - } - return 1 ; -} |
