United States-English |
|
|
HP-UX Reference > Ssetpgid(2)HP-UX 11i Version 3: February 2007 |
|
NAMEsetpgid(), setpgrp2() — set process group ID for job control SYNOPSIS#include <unistd.h> int setpgid(pid_t pid, pid_t pgid); int setpgrp2(pid_t pid, pid_t pgid); DESCRIPTIONThe setpgid() and setpgrp2() system calls cause the process specified by pid to join an existing process group or create a new process group within the session of the calling process. The process group ID of the process whose process ID is pid is set to pgid. If pid is zero, the process ID of the calling process is used. If pgid is zero, the process ID of the indicated process is used. The process group ID of a session leader does not change. setpgrp2() is provided for backward compatibility only. Security RestrictionsSome or all of the actions associated with this system call are subject to compartmental restrictions. See compartments(5) for more information about compartmentalization on systems that support that feature. Compartmental restrictions can be overridden if the process possesses the PRIV_COMMALLOWED privilege (COMMALLOWED). Processes owned by the superuser may not have this privilege. Processes owned by any user may have this privilege, depending on system configuration. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUEsetpgid() and setpgrp2() return the following values:
ERRORSIf setpgid() or setpgrp2() fails, errno is set to one of the following values.
SEE ALSObsdproc(3C), exec(2), exit(2), fork(2), getpid(2), kill(2), setsid(2), signal(2), privileges(5), termio(7). |
Printable version | ||
|