From: Guillem Jover Date: Fri, 24 Nov 2006 04:08:00 +0000 (+0000) Subject: Require POSIX inside subprocerr in controllib.pl. Closes: #390636 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec56457d3164b300e934cf45e033b52172d01616;p=dpkg Require POSIX inside subprocerr in controllib.pl. Closes: #390636 Thanks to Brendan O'Dea . --- diff --git a/ChangeLog b/ChangeLog index 23d6c42b..c309f893 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-11-24 Brendan O'Dea + + * scripts/controllib.pl (subprocerr): Require POSIX for WIFEXITED, + WEXITSTATUS, WIFSIGNALED and WTERMSIG. + 2006-10-13 Guillem Jover * configure.ac: Bump version to 1.13.25~. diff --git a/debian/changelog b/debian/changelog index 226cbae8..a3d51bc0 100644 --- a/debian/changelog +++ b/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 . + * Require POSIX inside subprocerr in controllib.pl. Closes: #390636 + Thanks to Brendan O'Dea . [ Updated dpkg translations ] * Chinese (Traditional, Asho Yeh) diff --git a/scripts/controllib.pl b/scripts/controllib.pl index ff3d3747..d5705327 100755 --- a/scripts/controllib.pl +++ b/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";