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

Add channelMode to QProcess::startDetached

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Done
    • Affects Version/s: 4.3.2
    • Fix Version/s: 5.10.0
    • Component/s: Core: I/O
    • Labels:
      None
    • Commits:
      7ad55ca65f42351e231f31f7a9253ae6eaf1ebb3

      Description

      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.

        Attachments

          Issue Links

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

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes