aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstddjb/waitn_reap_posix.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2026-10-16 07:12:56 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2026-10-16 07:12:56 +0000
commita58812d5404844274298344babdb079e161d164f (patch)
tree09d55dceb8708d54e482acb0235358be287b989d /src/libstddjb/waitn_reap_posix.c
parentb74ab967cf330f9c7dd17ffa12009926ace5a4bc (diff)
downloadskalibs-a58812d5404844274298344babdb079e161d164f.tar.gz
Prepare for 2.16.0.0, remove waitn*, change openslurpclose_at
Diffstat (limited to 'src/libstddjb/waitn_reap_posix.c')
-rw-r--r--src/libstddjb/waitn_reap_posix.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/libstddjb/waitn_reap_posix.c b/src/libstddjb/waitn_reap_posix.c
deleted file mode 100644
index 4a6994f..0000000
--- a/src/libstddjb/waitn_reap_posix.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* ISC license. */
-
-#include <sys/wait.h>
-
-#include <skalibs/djbunix.h>
-
-int waitn_reap_posix (pid_t *pids, unsigned int len, int *w)
-{
- pid_t wanted = len ? pids[len-1] : 0 ;
- unsigned int n = 0 ;
- while (len)
- {
- int wstat ;
- int r = wait_pids_nohang(pids, len, &wstat) ;
- if (r < 0) return r ;
- else if (!r) break ;
- if (pids[r-1] == wanted) *w = wstat ;
- pids[r-1] = pids[--len] ;
- n++ ;
- }
- return n ;
-}