setpgid(2)

DESCRIPTION

move a process into a process group.

SYNOPSIS

long setpgid(int pid, int pgid);

ERRORS

  • -EINVAL
    • Pid or pgid is invalid after special-value handling.
  • -EPERM
    • The target is not the caller's child.
  • -EPERM
    • The target belongs to another session.
  • -EPERM
    • The target is a session leader.
  • -ESRCH
    • The target process does not exist.