setpgid(2)
DESCRIPTION
Moves a process into a process group.
SYNOPSIS
long setpgid(int pid, int pgid);
RETURN VALUE
- Returns a non-negative result on success. Negative values are ABI errno codes.
ERRORS
-EINVAL- The PID or process-group ID is zero after special-value handling.
-EPERM- The target is not a child of the caller.
-EPERM- The target belongs to another session.
-EPERM- The target is a session leader.
-ESRCH- The target process does not exist.
ABI
Arguments enter through the direct syscall ABI; validation is performed before entering the process subsystem.