зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
3aa785b585
Коммит
05a5607c2a
|
@ -251,11 +251,6 @@ function test_kill_2()
|
|||
}
|
||||
|
||||
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();
|
||||
test_kill();
|
||||
test_quick();
|
||||
|
|
|
@ -287,8 +287,14 @@ void PR_CALLBACK nsProcess::Monitor(void *arg)
|
|||
#ifdef XP_MACOSX
|
||||
int exitCode = -1;
|
||||
int status = 0;
|
||||
if (waitpid(process->mPid, &status, 0) == process->mPid && WIFEXITED(status))
|
||||
if (waitpid(process->mPid, &status, 0) == process->mPid) {
|
||||
if (WIFEXITED(status)) {
|
||||
exitCode = WEXITSTATUS(status);
|
||||
}
|
||||
else if(WIFSIGNALED(status)) {
|
||||
exitCode = 256; // match NSPR's signal exit status
|
||||
}
|
||||
}
|
||||
#else
|
||||
PRInt32 exitCode = -1;
|
||||
if (PR_WaitProcess(process->mProcess, &exitCode) != PR_SUCCESS)
|
||||
|
|
Загрузка…
Ссылка в новой задаче