setpgid.c 524 B

123456789101112131415161718192021222324
  1. /*
  2. * setpgid() 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 || defined __USE_SVID
  10. #include <unistd.h>
  11. #define __NR___syscall_setpgid __NR_setpgid
  12. static __inline__ _syscall2(int, __syscall_setpgid,
  13. __kernel_pid_t, pid, __kernel_pid_t, pgid)
  14. int setpgid(pid_t pid, pid_t pgid)
  15. {
  16. return (__syscall_setpgid(pid, pgid));
  17. }
  18. libc_hidden_def(setpgid)
  19. #endif