getpgrp()--Get Process Group ID


  Syntax
 #include <sys/types.h>   
 #include <unistd.h>

 pid_t getpgrp(void);

  Service Program Name: QP0WSRV1

  Default Public Authority: *USE

  Threadsafe: Yes

The getpgrp() function returns the process group ID of the calling process.


Parameters

None


Authorities

None.


Return Value

pid_t The value returned by getpgrp() is the process group ID of the calling process.


Error Conditions

The getpgrp() function is always successful and does not return an error.


Usage Notes

The getpgrp() function enables a process for signals if the process is not already enabled for signals. For details, see Qp0sEnableSignals()--Enable Process for Signals.


Related Information


Example

See Code disclaimer information for information pertaining to code examples.

For an example of using this function, see the child program in Using the Spawn Process and Wait for Child Process APIs



API introduced: V3R6
Top | UNIX-Type APIs | APIs by category