mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 19:41:49 +00:00
Bug 599478: Fix incorrect exit code for unhandled signal termination in nsIProcess on Mac OS X. r=bsmedberg a=blocking2.0betaN+
This commit is contained in:
parent
95a2bfd922
commit
42b9381c9d
@ -251,11 +251,6 @@ function test_kill_2()
|
|||||||
}
|
}
|
||||||
|
|
||||||
function run_test() {
|
function run_test() {
|
||||||
var isOSX = ("nsILocalFileMac" in Components.interfaces);
|
|
||||||
if (isOSX) {
|
|
||||||
dump("INFO | test_nsIProcess.js | Skipping test on mac, bug 599478")
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
set_environment();
|
set_environment();
|
||||||
test_kill();
|
test_kill();
|
||||||
test_quick();
|
test_quick();
|
||||||
|
@ -287,8 +287,14 @@ void PR_CALLBACK nsProcess::Monitor(void *arg)
|
|||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
int exitCode = -1;
|
int exitCode = -1;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
if (waitpid(process->mPid, &status, 0) == process->mPid && WIFEXITED(status))
|
if (waitpid(process->mPid, &status, 0) == process->mPid) {
|
||||||
exitCode = WEXITSTATUS(status);
|
if (WIFEXITED(status)) {
|
||||||
|
exitCode = WEXITSTATUS(status);
|
||||||
|
}
|
||||||
|
else if(WIFSIGNALED(status)) {
|
||||||
|
exitCode = 256; // match NSPR's signal exit status
|
||||||
|
}
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
PRInt32 exitCode = -1;
|
PRInt32 exitCode = -1;
|
||||||
if (PR_WaitProcess(process->mProcess, &exitCode) != PR_SUCCESS)
|
if (PR_WaitProcess(process->mProcess, &exitCode) != PR_SUCCESS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user