From 56072bf87450c2d2e2fc0274ea215bda295ebd05 Mon Sep 17 00:00:00 2001 From: Brendan O'Dea Date: Tue, 3 Oct 2006 05:46:52 +0000 Subject: [PATCH] ensure POSIX is loaded in subprocerr --- scripts/controllib.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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"; -- 2.39.5