]> granicus.if.org Git - php/commitdiff
also catch segfaults reported by subshells
authorMichael Wallner <mike@php.net>
Fri, 30 Jan 2015 17:00:23 +0000 (18:00 +0100)
committerMichael Wallner <mike@php.net>
Fri, 30 Jan 2015 17:00:23 +0000 (18:00 +0100)
run-tests.php

index 9d1a78c1e496d3cc7c0ec098773acdcdd959908a..0931647d4ae824483b7c241d179d934ae976f989 100755 (executable)
@@ -1125,7 +1125,10 @@ function system_with_timeout($commandline, $env = null, $stdin = null)
        $stat = proc_get_status($proc);
 
        if ($stat['signaled']) {
-               $data .= "\nTermsig=" . $stat['stopsig'];
+               $data .= "\nTermsig=" . $stat['stopsig'] . "\n";
+       }
+       if ($stat["exitcode"] > 128) {
+               $data .= "\nTermsig=" . ($stat["exitcode"] - 128) . "\n";
        }
 
        $code = proc_close($proc);