How to get the running process' parent process' ID in Bash?

How to get the running process' parent process' ID in Bash?

asked Jun 5 by dtivl (2,500 points)

1 Answer

In Bash, you can get the parent process's pid from the variable PPID.

Note that in a (...) subshell, the $$ stores the subshell's parent shell pid actually.

answered Jun 5 by dtivl (2,500 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...