wait3.c 786 B

12345678910111213141516171819202122232425
  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 <sys/syscall.h>
  7. #include <sys/types.h>
  8. #include <sys/wait.h>
  9. #include <sys/resource.h>
  10. #if defined __USE_BSD
  11. /* libc_hidden_proto(wait4) */
  12. /* Wait for a child to exit. When one does, put its status in *STAT_LOC and
  13. * return its process ID. For errors return (pid_t) -1. If USAGE is not nil,
  14. * store information about the child's resource usage (as a `struct rusage')
  15. * there. If the WUNTRACED bit is set in OPTIONS, return status for stopped
  16. * children; otherwise don't. */
  17. pid_t wait3 (__WAIT_STATUS stat_loc, int options, struct rusage * usage)
  18. {
  19. return wait4 (WAIT_ANY, stat_loc, options, usage);
  20. }
  21. #endif