]> err.no Git - dpkg/commitdiff
Require POSIX inside subprocerr in controllib.pl. Closes: #390636
authorGuillem Jover <guillem@debian.org>
Fri, 24 Nov 2006 04:08:00 +0000 (04:08 +0000)
committerGuillem Jover <guillem@debian.org>
Fri, 24 Nov 2006 04:08:00 +0000 (04:08 +0000)
Thanks to Brendan O'Dea <bod@debian.org>.

ChangeLog
debian/changelog
scripts/controllib.pl

index 23d6c42bf946768eae6867790da2e646ba91f1ee..c309f8931eced83005d4b558047edf72067d1f01 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-24  Brendan O'Dea  <bod@debian.org>
+
+       * scripts/controllib.pl (subprocerr): Require POSIX for WIFEXITED,
+       WEXITSTATUS, WIFSIGNALED and WTERMSIG.
+
 2006-10-13  Guillem Jover  <guillem@debian.org>
 
        * configure.ac: Bump version to 1.13.25~.
index 226cbae829bcc5e2180a550c5a7809a154b83a35..a3d51bc04be39ecfe9e6948fc555b13c5d2961db 100644 (file)
@@ -6,6 +6,8 @@ dpkg (1.13.25~) UNRELEASED; urgency=low
   * Document in its man page that update-alternatives requires cooperation
     from all packages dealing with the specific file. Closes: #396338
     Thanks to Tomas Pospisek <tpo_deb@sourcepole.ch>.
+  * Require POSIX inside subprocerr in controllib.pl. Closes: #390636
+    Thanks to Brendan O'Dea <bod@debian.org>.
 
   [ Updated dpkg translations ]
   * Chinese (Traditional, Asho Yeh)
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";