wait3.c 746 B

12345678910111213141516171819202122
  1. /*
  2. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  3. *
  4. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  5. */
  6. #include <syscall.h>
  7. #include <sys/types.h>
  8. #include <sys/wait.h>
  9. #include <sys/resource.h>
  10. libc_hidden_proto(wait4)
  11. /* Wait for a child to exit. When one does, put its status in *STAT_LOC and
  12. * return its process ID. For errors return (pid_t) -1. If USAGE is not nil,
  13. * store information about the child's resource usage (as a `struct rusage')
  14. * there. If the WUNTRACED bit is set in OPTIONS, return status for stopped
  15. * children; otherwise don't. */
  16. pid_t wait3 (__WAIT_STATUS stat_loc, int options, struct rusage * usage)
  17. {
  18. return wait4 (WAIT_ANY, stat_loc, options, usage);
  19. }