Python os.getpgrp() Method
Example
Find the current process group id:
#Import os Library
import os
#print the process group id
print (os.getpgrp())
Try it Yourself »
Definition and Usage
The os.getpgrp()
method returns the current process group id.
The current process group id can also be found by os.getpgid(0)
.
Note: Available on UNIX platforms only.
Syntax
os.getpgrp()
Technical Details
Return Value: | An int value, returns the current process group id |
---|---|
Python Version: | 2.6 |