summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess_unix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qprocess_unix.cpp')
-rw-r--r--src/corelib/io/qprocess_unix.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index 4fa36238a7..d31691d950 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -885,9 +885,7 @@ bool QProcessPrivate::startDetached(qint64 *pid)
if (!openChannelsForDetached()) {
// openChannel sets the error string
- closeChannel(&stdinChannel);
- closeChannel(&stdoutChannel);
- closeChannel(&stderrChannel);
+ closeChannels();
return false;
}
@@ -935,9 +933,7 @@ bool QProcessPrivate::startDetached(qint64 *pid)
}
int savedErrno = errno;
- closeChannel(&stdinChannel);
- closeChannel(&stdoutChannel);
- closeChannel(&stderrChannel);
+ closeChannels();
if (childPid == -1) {
setErrorAndEmit(QProcess::FailedToStart, QLatin1String("fork: ") + qt_error_string(savedErrno));