diff options
Diffstat (limited to 'libiberty/waitpid.c')
-rw-r--r-- | libiberty/waitpid.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libiberty/waitpid.c b/libiberty/waitpid.c new file mode 100644 index 0000000..23db0b9 --- /dev/null +++ b/libiberty/waitpid.c @@ -0,0 +1,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; + } +} |