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

Re: [PATCH] Attempt at improving the perlipc docs

Thread Previous
From:
Zefram
Date:
April 19, 2010 11:24
Subject:
Re: [PATCH] Attempt at improving the perlipc docs
Message ID:
20100419182426.GK17280@lake.fysh.org
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?

-zefram

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About