In python, how to get the parent PID of specific child PID?

Viewed 242

I need to get the parent ID of a specific pid. I was able to get the pids of a executable process using the psutil.process_iter() but I need to know what is the parent of this pids in order to kill the process.

1 Answers
psutil.Process(other_pid).ppid()
Related