diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-03-01 16:15:56 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-13 17:25:07 +0100 |
commit | 7ec521a373b03782b4ef364cb92427283187c78e (patch) | |
tree | f761b9fddbc2711e80d6721977a712df3b6dbdf4 /src/corelib/io/qprocess_win.cpp | |
parent | 92f59be2b42e874c0215c2524336b7e3e8da5929 (diff) |
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>
Diffstat (limited to 'src/corelib/io/qprocess_win.cpp')
-rw-r--r-- | src/corelib/io/qprocess_win.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp index 693778e629..0fec8e4738 100644 --- a/src/corelib/io/qprocess_win.cpp +++ b/src/corelib/io/qprocess_win.cpp @@ -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)); } } |