diff options
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qprocess_unix.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index a849519635..713af9bd40 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -949,16 +949,14 @@ bool QProcessPrivate::startDetached(qint64 *pid) qt_safe_close(pidPipe[1]); // copy the stdin socket if asked to (without closing on exec) - if (inputChannelMode != QProcess::ForwardedInputChannel) + if (stdinChannel.type == Channel::Redirect) qt_safe_dup2(stdinChannel.pipe[0], STDIN_FILENO, 0); // copy the stdout and stderr if asked to - if (processChannelMode != QProcess::ForwardedChannels) { - if (processChannelMode != QProcess::ForwardedOutputChannel) - qt_safe_dup2(stdoutChannel.pipe[1], STDOUT_FILENO, 0); - if (processChannelMode != QProcess::ForwardedErrorChannel) - qt_safe_dup2(stderrChannel.pipe[1], STDERR_FILENO, 0); - } + if (stdoutChannel.type == Channel::Redirect) + qt_safe_dup2(stdoutChannel.pipe[1], STDOUT_FILENO, 0); + if (stderrChannel.type == Channel::Redirect) + qt_safe_dup2(stderrChannel.pipe[1], STDERR_FILENO, 0); if (!encodedWorkingDirectory.isEmpty()) { if (QT_CHDIR(encodedWorkingDirectory.constData()) == -1) |