diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2021-02-18 09:36:56 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2021-02-21 18:46:28 -0800 |
commit | 73a04edce151b21ea5d07494603c0317716e99d9 (patch) | |
tree | 145b501dbb9a9ad5eb03e73c595b7066bdd47769 /src/corelib/io/qprocess.cpp | |
parent | 86ebdc07dfd8c4df09b21ecc528dcae8d978f7e1 (diff) |
QProcess::startDetached: set the error condition on failure to start
And set *pid to -1.
[ChangeLog][QtCore][QProcess] If a startDetached() fails to start the
target application, the QProcess object should now have a proper error
string in errorString().
Pick-to: 6.1
Change-Id: Ic90d8429a0eb4837971dfffd1664e825ffcb923e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'src/corelib/io/qprocess.cpp')
-rw-r--r-- | src/corelib/io/qprocess.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 2462d829a0..f03fc067cf 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -2132,11 +2132,12 @@ void QProcess::startCommand(const QString &command, OpenMode mode) temporarily freeze. If the function is successful then *\a pid is set to the process identifier - of the started process. Note that the child process may exit and the PID - may become invalid without notice. Furthermore, after the child process - exits, the same PID may be recycled and used by a completely different - process. User code should be careful when using this variable, especially - if one intends to forcibly terminate the process by operating system means. + of the started process; otherwise, it's set to -1. Note that the child + process may exit and the PID may become invalid without notice. + Furthermore, after the child process exits, the same PID may be recycled + and used by a completely different process. User code should be careful + when using this variable, especially if one intends to forcibly terminate + the process by operating system means. Only the following property setters are supported by startDetached(): \list |