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

QProcess doesn't finish after Ctrl-Z + BG on Linux

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • 5.10
    • Core: I/O
    • None
    • Linux/X11

    Description

      I am using Qt5.10 and RedHat Enterprise Linux 8.6

      My application starts a child QProcess to do some work when a button is clicked.
      Things work fine except when I do the following
      Invoke the application in a Linux terminal
      Suspend it using Ctrl+Z
      Put it in background (bg)
      Now when I click the button, I can see the QProcess get started but it never emits a finished signal.
      When I run "ps", its shows that process as <defunct>

      I am able to reproduce this using a simple test Qt application (see attachment)
      It contains a button which when clicked starts a QProcess that runs the "sleep 1" command.
      Here is what I see
      Invoke test application
      Ctrl-Z
      bg
      Press button
      Things work fine (Get both started and finished signals)

      Invoke test application
      Press button
      Things work fine (Get both started and finished signals)
      Ctrl-Z
      bg
      Press button
      Things don't work anymore (Get started signal but no finished signal!!!)

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            sameerk Sameer Kadam
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes