Skip to content



getpgrp - get the process group ID of the calling process


The getpgrp() function returns the process group ID of the calling process. Process groups are the mechanism used by drivers implementing job control.

getpgrp() is the equivalent of getpgid(0), getpgid() can be used to get the process group ID for another process; see getpgid(2).

The main advantage of using getpgrp() is that it saves an expensive system call (in the case of getpgid(2)). On the other hand, getpgrp() can be only used with the calling process.


No arguments for this system call.






To log a trace when the getpgrp() system call is called.

Example Use Case

This system call can be used by a service or daemon that needs to change the process group ID in order to run a command or to determine the process group ID to check if it is a child process.


This system call does not have any known issues.

getpgid(2) - get a process group ID of another process

This document was automatically generated by OpenAI and needs review. It might not be accurate and might contain errors. The authors of Tracee recommend that the user reads the "events.go" source file to understand the events and their arguments better.