[perl #50538] when( @n && %n ) fails to smart match
[p5sagit/p5-mst-13.2.git] / util.c
diff --git a/util.c b/util.c
index 36166fb..82f147e 100644 (file)
--- a/util.c
+++ b/util.c
@@ -3011,6 +3011,7 @@ Perl_wait4pid(pTHX_ Pid_t pid, int *statusp, int flags)
 #endif
     if (result < 0 && errno == EINTR) {
        PERL_ASYNC_CHECK();
+       errno = EINTR; /* reset in case a signal handler changed $! */
     }
     return result;
 }