Change 13725 by jhi@alpha on 2001/12/17 16:43:09

        Integrate perlio; interruptable system().

Affected files ...

.... //depot/perl/util.c#303 integrate

Differences ...

==== //depot/perl/util.c#303 (text) ====
Index: perl/util.c
--- perl/util.c.~1~     Mon Dec 17 10:00:05 2001
+++ perl/util.c Mon Dec 17 10:00:05 2001
@@ -2420,6 +2420,7 @@
 I32
 Perl_wait4pid(pTHX_ Pid_t pid, int *statusp, int flags)
 {
+    I32 result;
     if (!pid)
        return -1;
 #if !defined(HAS_WAITPID) && !defined(HAS_WAIT4) || defined(HAS_WAITPID_RUNTIME)
@@ -2457,15 +2458,14 @@
     if (!HAS_WAITPID_RUNTIME)
        goto hard_way;
 #  endif
-    return PerlProc_waitpid(pid,statusp,flags);
+    result = PerlProc_waitpid(pid,statusp,flags);
 #endif
 #if !defined(HAS_WAITPID) && defined(HAS_WAIT4)
-    return wait4((pid==-1)?0:pid,statusp,flags,Null(struct rusage *));
+    result = wait4((pid==-1)?0:pid,statusp,flags,Null(struct rusage *));
 #endif
 #if !defined(HAS_WAITPID) && !defined(HAS_WAIT4) || defined(HAS_WAITPID_RUNTIME)
   hard_way:
     {
-       I32 result;
        if (flags)
            Perl_croak(aTHX_ "Can't do waitpid with flags");
        else {
@@ -2474,9 +2474,12 @@
            if (result < 0)
                *statusp = -1;
        }
-       return result;
     }
 #endif
+    if (result < 0 && errno == EINTR) {
+       PERL_ASYNC_CHECK();
+    }
+    return result;
 }
 #endif /* !DOSISH || OS2 || WIN32 || NETWARE */
 
@@ -3894,8 +3897,8 @@
 
 Returns a pointer to the next character after the parsed
 vstring, as well as updating the passed in sv.
- * 
-Function must be called like 
+ *
+Function must be called like
        
         sv = NEWSV(92,5);
        s = new_vstring(s,sv);
End of Patch.

Reply via email to