wait3.c 572 B

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