getpgid.c 514 B

123456789101112131415161718192021222324
  1. /*
  2. * getpgid() for uClibc
  3. *
  4. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  5. *
  6. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  7. */
  8. #include <sys/syscall.h>
  9. #if defined __USE_UNIX98
  10. #include <unistd.h>
  11. #define __NR___syscall_getpgid __NR_getpgid
  12. static __inline__ _syscall1(__kernel_pid_t, __syscall_getpgid, __kernel_pid_t, pid)
  13. pid_t __getpgid(pid_t pid)
  14. {
  15. return (__syscall_getpgid(pid));
  16. }
  17. #ifdef __USE_XOPEN_EXTENDED
  18. weak_alias(__getpgid,getpgid)
  19. #endif
  20. #endif