aboutsummaryrefslogtreecommitdiff
path: root/libiberty/waitpid.c
blob: 23db0b932d2e2c9d5d6b9b3a561e420e04ac54b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
int
waitpid (pid, stat_loc, options)
	int pid, *stat_loc, options;
{
  for (;;)
    {
      int wpid = wait(stat_loc);
      if (wpid == pid || wpid == -1)
	return wpid;
    }
}