QProcess/Win: do not treat all negative exit codes as crash
Only exit codes that are likely to be in the range of EXCEPTION_* and STATUS_* codes are treated as crash. Task-number: QTBUG-28735 Change-Id: I36ae6dc4be28df0c6b6b7361df2c2d0203ee7919 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
92f59be2b4
commit
7ec521a373
@ -795,8 +795,8 @@ void QProcessPrivate::findExitCode()
|
||||
DWORD theExitCode;
|
||||
if (GetExitCodeProcess(pid->hProcess, &theExitCode)) {
|
||||
exitCode = theExitCode;
|
||||
//### for now we assume a crash if exit code is less than -1 or the magic number
|
||||
crashed = (exitCode == 0xf291 || (int)exitCode < 0);
|
||||
crashed = (exitCode == 0xf291 // our magic number, see killProcess
|
||||
|| (theExitCode >= 0x80000000 && theExitCode < 0xD0000000));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user