Get process ID
-
getpid
-
getppid
-
Works on all 3 Operating systems
import os
print(os.getpid())
print(os.getppid())
93518
92859
This is on Linux/OSX
echo $$
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
getpid
getppid
Works on all 3 Operating systems
import os
print(os.getpid())
print(os.getppid())
93518
92859
This is on Linux/OSX
echo $$