How to end process started in os.popen?

Erno Kuusela erno-news at
Mon Feb 12 11:51:03 EST 2001

In article <96918n$6sn$1 at>, bragib at writes:

| I am running a csh script and getting the output through a pipe using
| os.popen() on Unix.  I would like to be able to kill the running of the
| csh script if a certain event occurs.

| Just closing the pipe won't stop the csh script.

you could have the csh script write its pid to a file somewhere,
and use that. or you could roll your own popen with fork, pipe and exec
that returned the pid too.

  -- erno

More information about the Python-list mailing list