closing popen2
Yu Wang
Yu.Wang at synopsys.com
Tue May 6 01:01:14 EDT 2003
Maybe you would have to use "fork()" to get the pid;
or, as I'm doing, use a Popen3 class, then also get the pid;
with the pid, I think it would be quite easy for the job.
Any other methods? I'm expecting to know, too.
And, with Popen3 class, I encounter a problem saying
"Errno24 too many opened files"
at "python2.2/popen2.py", line 37, in __init__
c2pread, c2pwrite = os.pipe()
Anybody know such errors ?
Cipo Fuzo wrote:
> Hello,
>
> How do I close a process opened with popen2?
> I do:
>
> proc = popen2(cmd)
> proc[0].close()
> proc[1].close()
>
> but this doesn't end 'cmd'. When I do a ps in the shell, I
> can still see
>
> [cmd <defunct>]
>
> Thanks,
> Cipo
>
>
>
--
Love Your Family!
Yu Wang
More information about the Python-list
mailing list