getpgrp.c 420 B

1234567891011121314151617181920
  1. /*
  2. * getpgrp() for uClibc
  3. *
  4. * Copyright (C) 2000-2008 by Erik Andersen <andersen@codepoet.org>
  5. *
  6. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  7. */
  8. #include <sys/syscall.h>
  9. #include <unistd.h>
  10. #ifdef __NR_getpgrp
  11. /* According to the manpage the POSIX.1 version is favoured */
  12. _syscall_noerr0(pid_t, getpgrp)
  13. #elif defined __NR_getpgid
  14. pid_t getpgrp(void)
  15. {
  16. return getpgid(0);
  17. }
  18. #endif