Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-2058

Add channelMode to QProcess::startDetached

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Done
    • Icon: P4: Low P4: Low
    • 5.10.0
    • 4.3.2
    • Core: I/O
    • None
    • 7ad55ca65f42351e231f31f7a9253ae6eaf1ebb3

      When one does a QProcess::startDetached, the new process' stdout is printed to the original process' terminal. QProcess::start does not exhibit this problem. It has probably been with us for a while, so perhaps nothing can be done. This is specific to linux; on Windows (if I add a CONFIG += console), the newly created process will bring up a new terminal.

      Resolution: Unfortunately, because this behavior has been in Qt for so long, we cannot change this behavior.

      Changed to suggestion: Could we possibly add an enum to the ProcessChannelMode that would allow startDetached to reopen stdout/stderr to /dev/null (opposite of ForwardedChannels)? This way the original functionality will be intact and startDetached can be modified to operate more like it's documentation ("On Unix, the started process will run in its own session and act like a daemon.")

      Update: Investigate further.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            jbornema Joerg Bornemann
            mch Jervey Kong
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes