summaryrefslogtreecommitdiff
path: root/src/libstddjb/wait_reap.c
blob: 051b11e518afea2a2e37f29e88991a5db5c82427 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* ISC license. */

#include <skalibs/djbunix.h>

unsigned int wait_reap ()
{
  unsigned int n = 0 ;
  int wstat ;
  while (wait_nohang(&wstat) > 0) n++ ;
  return n ;
}