popen3 and PID - how?

Simon Budig simon at unix-ag.uni-siegen.de
Thu May 27 12:59:47 EDT 1999


Donn Cave <donn at u.washington.edu> wrote:
> Simon Budig <simon at unix-ag.uni-siegen.de> writes:
> | The problem is: Sometimes I have to send the "foobar"-Program a signal.
> | How can I get the PID of this process?

> The source for popen3() is in /usr/local/lib/python1.5/popen2.py (or
> somewhere like that, depending on your site.)  You'll find that popen3()
> is merely a couple of lines that create a Popen3 class instance and
> return references to its pipe files.  If you use the class directly,
> instead of the function, its PID is an attribute of the instance.

Argl - why is this attribute undocumented... I did RTFM, RTFM, RTFM and
the solution would have been RTFS... ;-)

Thanks!
	Simon
-- 
      Simon.Budig at unix-ag.org       http://www.home.unix-ag.org/simon/
                         ---===###===---
*** Online-Petition gegen unerwuenschte Werbe-E-Mail:
*** http://www.politik-digital.de/spam/




More information about the Python-list mailing list