Scenario: subprocess created a subprocess and so on, how can i get it's pid?
I used subprocess.popen to launch the first subprocess, for example word file, this word file generated a new subprocess, how can i get it's pid?
Scenario: subprocess created a subprocess and so on, how can i get it's pid?
I used subprocess.popen to launch the first subprocess, for example word file, this word file generated a new subprocess, how can i get it's pid?
Using psutil: