develooper Front page | perl.perl5.porters | Postings from April 2010

Re: [PATCH] Attempt at improving the perlipc docs

Thread Previous
April 19, 2010 11:24
Re: [PATCH] Attempt at improving the perlipc docs
Message ID:
Leon Timmermans wrote:
>Mentioning a problem is a good start, but what I'm missing is how to
>deal with this.

The fix is POSIX::waitpid() with the WNOHANG flag.  The basic sane
SIGCHLD handler will call waitpid(-1, WNOHANG) repeatedly, until it
indicates that there are no more children to reap.

This non-blocking waiting isn't necessarily available everywhere, though.
On some very old Unices it's not available, and presumably some non-Unix
OSes might not have it either.  Usually not worth worrying about,
I suspect.

L<perlipc> already favours waitpid() over wait().  Possibly
L<perlfunc/wait> should point at it too?


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About