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

Using `QProcess::startDetached()` keeps Zygote processes around after application quits

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • None
    • 6.5.2
    • WebEngine
    • None
    • Linux/X11
    • daf13fea1 (112-based)

    Description

      With something like:

      #include <QtWidgets/QApplication>
      #include <QtWebEngineWidgets/QWebEngineView>
      #include <QtCore/QProcess>
      #include <QtCore/QTimer>
      
      int main(int argc, char *argv[]) {
          QApplication app(argc, argv);
          QWebEngineView view;
          view.load(QUrl("https://qt.io"));
          view.show();
      
          QProcess::startDetached("qtcreator");
          QTimer::singleShot(5000, &app, &QApplication::quit);
          return app.exec();
      }
      

      The following processes will stick around after the application has exited:

      /usr/lib/qt6/QtWebEngineProcess --type=zygote --no-zygote-sandbox --application-name=qtbug-zygote --webengine-schemes=qrc:sV --lang=en
      /usr/lib/qt6/QtWebEngineProcess --type=zygote --application-name=qtbug-zygote --webengine-schemes=qrc:sV --lang=en
      

      Only when the subprocess (e.g. Qt Creator) quits, those stray Zygote processes exit as well.

      Attachments

        Issue Links

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

          Activity

            People

              pvarga Peter Varga
              the compiler Florian Bruhin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes