summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-03-16 18:10:34 -0700
committerThiago Macieira <thiago.macieira@intel.com>2023-04-25 21:53:30 -0400
commit956b2495285251e4840ec32885ffa2cfbb7bd79c (patch)
treecf9fcfe75d0cba1d283e72c83d10a354dd2cb9a9 /src
parent67431e4168dd272d4c422a8bec01580091544fda (diff)
QProcess/Unix: don't overwrite openChannels() error message
Pick-to: 6.5 Change-Id: Icfe44ecf285a480fafe4fffd174d0fa4701b0076 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qprocess_unix.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index 24c5ebc6d2c..9fbf869455c 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -421,8 +421,12 @@ void QProcessPrivate::startProcess()
#endif
// Initialize pipes
- if (!openChannels() || qt_create_pipe(childStartedPipe) != 0) {
- setErrorAndEmit(QProcess::FailedToStart, qt_error_string(errno));
+ if (!openChannels()) {
+ // openChannel sets the error string
+ return;
+ }
+ if (qt_create_pipe(childStartedPipe) != 0) {
+ setErrorAndEmit(QProcess::FailedToStart, "pipe: "_L1 + qt_error_string(errno));
cleanup();
return;
}