On Feb 17, 5:08 am, shawnhco...@gmail.com (Shawn H Corey) wrote:
> C.DeRykus wrote:
> > No, you don't need to do that.  If the child is interrupted by an
> > uncaught
> > signal
>
> I'm not talking about the child being interrupted; I'm talking about the
> parent.
>
> As I said, the Perl documentation is not clear if it's wait command
> filters out signals not about its children.

Again no.  Potentially they could, but they're not.
A newer Unix always interrupts a wait or waitpid.

>
> Come to think of it, it shouldn't.  If it did, there's no way to
> interrupt a wait on those rare times you want to.
>

Right.  Typically, to timeout a child  that might take too long,
you use  an eval {} and alarm().

> And it happens with sleep too.  sleep can be interrupted by a signal
> that's not an alarm.
>

Yes.  Any "slow"  or blocking system call will by default be
interruptible. (Old Unixes used to return an error when
"slow" or blocking calls were interrupted and set errno
to EINTR too which made programming much messier).

--
Charles DeRykus


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to