summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qprocess.cpp')
-rw-r--r--src/corelib/io/qprocess.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 16fb2be0ae..878f52fd00 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -834,9 +834,7 @@ void QProcessPrivate::cleanup()
delete stateNotifier;
stateNotifier = nullptr;
}
- closeChannel(&stdoutChannel);
- closeChannel(&stderrChannel);
- closeChannel(&stdinChannel);
+ closeChannels();
destroyPipe(childStartedPipe);
#ifdef Q_OS_UNIX
if (forkfd != -1)
@@ -926,6 +924,16 @@ bool QProcessPrivate::openChannels()
/*!
\internal
*/
+void QProcessPrivate::closeChannels()
+{
+ closeChannel(&stdoutChannel);
+ closeChannel(&stderrChannel);
+ closeChannel(&stdinChannel);
+}
+
+/*!
+ \internal
+*/
bool QProcessPrivate::openChannelsForDetached()
{
// stdin channel.