source:
trunk/minix/lib/posix/_waitpid.c@
16
| Last change on this file since 16 was 9, checked in by , 15 years ago | |
|---|---|
| File size: 307 bytes | |
| Line | |
|---|---|
| 1 | #include <lib.h> |
| 2 | #define waitpid _waitpid |
| 3 | #include <sys/wait.h> |
| 4 | |
| 5 | PUBLIC pid_t waitpid(pid, status, options) |
| 6 | pid_t pid; |
| 7 | int *status; |
| 8 | int options; |
| 9 | { |
| 10 | message m; |
| 11 | |
| 12 | m.m1_i1 = pid; |
| 13 | m.m1_i2 = options; |
| 14 | if (_syscall(MM, WAITPID, &m) < 0) return(-1); |
| 15 | if (status != 0) *status = m.m2_i1; |
| 16 | return m.m_type; |
| 17 | } |
Note:
See TracBrowser
for help on using the repository browser.