Bug 1575974 - Report any non-zero exit code as a process failure in nsIProcess r=gsvelto

EXIT_FAILURE is 'implementation defined' but can be defined to be 1.
In our case, pingsender exits with EXIT_FAILURE but nsIProcess wasn't
reporting it as failure because it thought failures were always negative.

Differential Revision: https://phabricator.services.mozilla.com/D45038

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tom Ritter 2019-09-10 10:44:10 +00:00
Родитель d02e9c51fb
Коммит 323d7cb7e2
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -65,7 +65,7 @@ function runMinidumpAnalyzer(minidumpPath, allThreads) {
break;
case "process-failed":
gRunningProcesses.delete(process);
reject();
resolve();
break;
default:
reject(new Error("Unexpected topic received " + topic));

Просмотреть файл

@ -312,7 +312,7 @@ void nsProcess::ProcessComplete() {
}
const char* topic;
if (mExitValue < 0) {
if (mExitValue != 0) {
topic = "process-failed";
} else {
topic = "process-finished";