waste of resources ?
Aahz Maruch
aahz at netcom.com
Fri Jun 11 13:56:25 EDT 1999
In article <37606565.5A93BCE9 at compaq.com>,
Greg Ewing <greg.ewing at compaq.com> wrote:
>Arne Mueller wrote:
>>
>> chfds.remove(i)
>> os.waitpid(chpids[i], os.WNOHANG)
>> del chpids[i]
>
>If you're explicitly waiting for a particular child, *don't* use
>WNOHANG, because you *want* to block until that child has exited --
>which it may not have done yet, even though it has written its data.
I can't speak to Arne's situation, but I'm about to rewrite a chunk of
code to fork off a specific single child process precisely because I
*don't* want the parent to block while this code executes, but I still
want to reap the child later (and perform some final cleanup).
--
--- Aahz (@netcom.com)
Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het
"That doesn't stop me from wanting to work all three of them over with
the clue stick for while, with no safewords allowed." --abostick
More information about the Python-list
mailing list