]> err.no Git - dpkg/commitdiff
ensure POSIX is loaded in subprocerr
authorBrendan O'Dea <bod@debian.org>
Tue, 3 Oct 2006 05:46:52 +0000 (05:46 +0000)
committerBrendan O'Dea <bod@debian.org>
Tue, 3 Oct 2006 05:46:52 +0000 (05:46 +0000)
scripts/controllib.pl

index ff3d3747388a6e51e1acd718823bc6ce466410ee..d57053271aeceb6e5732118aecbdc37f92d8a99f 100755 (executable)
@@ -430,12 +430,13 @@ sub warnerror { if ($warnable_error) { &warn( @_ ); } else { &error( @_ ); } }
 
 sub subprocerr {
     local ($p) = @_;
-    if (WIFEXITED($?)) {
+    require POSIX;
+    if (POSIX::WIFEXITED($?)) {
         die sprintf(_g("%s: failure: %s gave error exit status %s"),
-                    $progname, $p, WEXITSTATUS($?))."\n";
-    } elsif (WIFSIGNALED($?)) {
+                    $progname, $p, POSIX::WEXITSTATUS($?))."\n";
+    } elsif (POSIX::WIFSIGNALED($?)) {
         die sprintf(_g("%s: failure: %s died from signal %s"),
-                    $progname, $p, WTERMSIG($?))."\n";
+                    $progname, $p, POSIX::WTERMSIG($?))."\n";
     } else {
         die sprintf(_g("%s: failure: %s failed with unknown exit code %d"),
                     $progname, $p, $?)."\n";