int setpgid(pid_t pid, pid_t pgid);
Is the process to set. If zero, the current process ID is used.
Is the new process group ID. If zero, the process group ID of pid is used.
The value of pid matches the process ID of a child process of the calling process, and the child process has successfully executed one of the
The value of pgid is less than 0 or is greater than or equal to PID_MAX.
pgid does not match the process ID of the process indicated by the pid parameter, and there is no process with a process group ID that matches pgid in the same session as the calling process.
The process that pid indicates is a session leader.
The value of pid is valid but matches the process ID of a child process of the calling process, and the child process is not in the same session as the calling process.
The value of pid does not match the process ID of the calling process or of a child process of the calling process.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
execl(), execle(), execlp(), execv(), execve(), execvp(), fork(), getpgid(), getpid(), getsid(), setpgrp(), setsid(), tcsetpgrp()
PTC MKS Toolkit 10.3 Documentation Build 39.