I tried google, but found getppid()
which gets the parent pid of the current process.
I need something like getppid(some_other_pid)
, is there such a thing? Basically takes the pid of some process and returns the parent process' pid.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…