popen3 and PID - how?
Simon Budig
simon at unix-ag.uni-siegen.de
Thu May 27 07:59:56 EDT 1999
Hi.
I tried to write a small program in python, which parses the output of
another command. So I did
(foo, bar, baz) = popen3 ("/bin/foobar")
line = foo.readline()
while line != ´´:
do something...
The problem is: Sometimes I have to send the "foobar"-Program a signal.
How can I get the PID of this process?
Or if I fork() the second process and do a system() or so, how can I get
the fd´s to handle with them in the first process? It is not possible to
change stdin, stdout and stderr so that the system()´ed process uses them...
Thanks for help,
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