close/popen issues (bug?)

M

Mark Sandler

Hi,
When i create a process using popen and then if i decide that i am not
interested in keeping the process pipes anymore, and I forget the
correspond variables [for example by exiting from function which called
popen]. Then, if python tries to destroy pipes and get locked on
pipe.close(), until the child process terminates... While this seem to
follow specifications (close waits until pipes closes on the other end,
and destructor calls close()),
it seems like a rather weird behaviour to me: i can't release pipes
until process terminates, essentially if i called popen from a
function, i should either return pipes to the outer level, or should
wait inside the function until the process terminates.

So i was wondering if it is a bug or not? (quick search on bug reports
didn't help) And if not, if there is an easy way around it...?

This behaviour is consistent on both windows/linux machines.

mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,266
Messages
2,571,318
Members
47,998
Latest member
GretaCjy4

Latest Threads

Top