Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (1733 KB)
getpgrp(2)Name | Synopsis | Description | Return Values | Errors | Attributes | See Also Name
Synopsis#include <unistd.h> pid_t getpid(void); pid_t getpgrp(void); pid_t getppid(void); pid_t getpgid(pid_t pid); DescriptionThe getpid() function returns the process ID of the calling process. The getpgrp() function returns the process group ID of the calling process. The getppid() function returns the parent process ID of the calling process. The getpgid() function returns the process group ID of the process whose process ID is equal to pid, or the process group ID of the calling process, if pid is equal to 0. Return ValuesUpon successful completion, these functions return the process group ID. Otherwise, getpgid() returns (pid_t)-1 and sets errno to indicate the error. Errors
The getpgid() function will fail if: The getpgid() function may fail if: AttributesSee attributes(5) for descriptions of the following attributes:
See AlsoIntro(2), exec(2), fork(2), getsid(2), setpgid(2), setpgrp(2), setsid(2), signal(3C), attributes(5), standards(5) Name | Synopsis | Description | Return Values | Errors | Attributes | See Also |
||||||