Browse Source

Require POSIX inside subprocerr in controllib.pl. Closes: #390636
Thanks to Brendan O'Dea <bod@debian.org>.

Guillem Jover 19 years ago
parent
commit
ec56457d31
3 changed files with 12 additions and 4 deletions
  1. 5 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 5 4
      scripts/controllib.pl

+ 5 - 0
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~.

+ 2 - 0
debian/changelog

@@ -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)

+ 5 - 4
scripts/controllib.pl

@@ -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";