wait3.c 595 B

1234567891011121314151617
  1. #define wait4 __wait4
  2. #include <syscall.h>
  3. #include <sys/types.h>
  4. #include <sys/wait.h>
  5. #include <sys/resource.h>
  6. /* Wait for a child to exit. When one does, put its status in *STAT_LOC and
  7. * return its process ID. For errors return (pid_t) -1. If USAGE is not nil,
  8. * store information about the child's resource usage (as a `struct rusage')
  9. * there. If the WUNTRACED bit is set in OPTIONS, return status for stopped
  10. * children; otherwise don't. */
  11. pid_t wait3 (__WAIT_STATUS stat_loc, int options, struct rusage * usage)
  12. {
  13. return wait4 (WAIT_ANY, stat_loc, options, usage);
  14. }