setpgid.c 341 B

12345678910111213141516
  1. #include <unistd.h>
  2. #include <syscall.h>
  3. #include <syscall_nums.h>
  4. #include <errno.h>
  5. DEFN_SYSCALL2(setpgid, SYS_SETPGID, int, int);
  6. DEFN_SYSCALL1(getpgid, SYS_GETPGID, int);
  7. int setpgid(pid_t pid, pid_t pgid) {
  8. __sets_errno(syscall_setpgid((int)pid,(int)pgid));
  9. }
  10. pid_t getpgid(pid_t pid) {
  11. __sets_errno(syscall_getpgid((int)pid));
  12. }