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

#include <skalibs/djbunix.h>

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