зеркало из https://github.com/mozilla/gecko-dev.git
Bug 372583: Make sure we don't clobber any other filehandles called "LOGFILE",
make sure the sigNum we return really is the signal number, Handle dumped core appropriately (stolen from the patch for bug 372582). r=rhelmer
This commit is contained in:
Родитель
89dd51a153
Коммит
a2d036bdc0
|
@ -101,6 +101,7 @@ sub RunShellCommand {
|
|||
my $output = '';
|
||||
my $childPid = 0;
|
||||
my $childStartedTime = 0;
|
||||
local *LOGFILE;
|
||||
|
||||
if (defined($changeToDir)) {
|
||||
chdir($changeToDir) or die("RunShellCommand(): failed to chdir() to "
|
||||
|
@ -133,7 +134,7 @@ sub RunShellCommand {
|
|||
endTime => undef,
|
||||
timedOut => $timedOut,
|
||||
exitValue => $exitValue,
|
||||
sigName => $signalNum,
|
||||
sigNum => $signalNum,
|
||||
output => undef,
|
||||
dumpedCore => $dumpedCore,
|
||||
pid => $childPid,
|
||||
|
@ -193,7 +194,7 @@ sub RunShellCommand {
|
|||
$childEndedTime = localtime();
|
||||
$exitValue = WEXITSTATUS($?);
|
||||
$signalNum = WIFSIGNALED($?) && WTERMSIG($?);
|
||||
$dumpedCore = WIFSIGNALED($?) && WCOREDUMP($?);
|
||||
$dumpedCore = WIFSIGNALED($?) && ($? & 128);
|
||||
$childReaped = 1;
|
||||
}
|
||||
}
|
||||
|
@ -225,7 +226,7 @@ sub RunShellCommand {
|
|||
endTime => $childEndedTime,
|
||||
timedOut => $timedOut,
|
||||
exitValue => $exitValue,
|
||||
sigName => $sigName,
|
||||
sigNum => $signalNum,
|
||||
output => $output,
|
||||
dumpedCore => $dumpedCore
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче