in reply to Re^2: Allowing user to abort waitpid
in thread Allowing user to abort waitpid

This (waitpid returning) may be the case with OP's legacy environment... Current perl appears to set up the signal handlers with SA_RESTART
Wow, anonymonk... I didn't know that. You're right (well, almost). It's not SA_RESTART, it's
PP(pp_waitpid) { ... if (PL_signals & PERL_SIGNALS_UNSAFE_FLAG) result = wait4pid(pid, &argflags, optype); else { while ((result = wait4pid(pid, &argflags, optype)) == -1 && er +rno == EINTR) { PERL_ASYNC_CHECK(); } } ...
(pp.c)

There is some mention in perlipc: On systems that supported it, older versions of Perl used the SA_RESTART flag when installing %SIG handlers. This meant that restartable system calls would continue rather than returning when a signal arrived. In order to deliver deferred signals promptly, Perl 5.8.0 and later do not use SA_RESTART. Consequently, restartable system calls can fail (with $! set to "EINTR") in places where they previously would have succeeded. The default ":perlio" layer retries "read", "write" and "close" as described above; interrupted "wait" and "waitpid" calls will always be retried.

Well, I stand corrected, then.

Replies are listed 'Best First'.
Re^4: Allowing user to abort waitpid
by Anonymous Monk on Mar 07, 2016 at 21:03 UTC

    Right, I stand corrected, too. The SA_RESTART is used only when unsafe signals are requested (environment PERL_SIGNALS=unsafe). Thank you.