Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: is it possible to launch a process with a certain PID?

I would like to launch a subprocess using subprocess.Popen().

Is it possible to assign a predetermined PID to that process?


1 Answers

As far as I'm aware, PID is assigned by the Operating system -- completely independent of subprocess. (In other words, No, you can't assign it -- at least not in any system independent way and without working at it extremely hard). You can get the child process's PID from Popen if that helps you at all...

like image 113
mgilson Avatar answered Dec 06 '25 04:12

mgilson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!