waitpid.c 637 B

1234567891011121314151617181920
  1. /*
  2. * Copyright (C) 2006 Steven J. Hill <sjhill@realitydiluted.com>
  3. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  4. *
  5. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. */
  7. #include <sys/wait.h>
  8. #include <cancel.h>
  9. pid_t __NC(waitpid)(pid_t pid, int *wait_stat, int options)
  10. {
  11. #if 1 /* kernel/exit.c says to avoid waitpid syscall */
  12. return __wait4_nocancel(pid, wait_stat, options, NULL);
  13. #else
  14. return INLINE_SYSCALL(waitpid, 3, pid, wait_stat, options);
  15. #endif
  16. }
  17. CANCELLABLE_SYSCALL(pid_t, waitpid, (pid_t pid, int *wait_stat, int options), (pid, wait_stat, options))
  18. lt_libc_hidden(waitpid)