Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Starting process detached exit upon parent exit

Starting process detached exit upon parent exit

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 333 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SherifOmran
    wrote on last edited by SherifOmran
    #1

    `hello guys, this is my code to start a detached process. However, i found that the processes close when the parent application is closed. Am i doing something wrong? The main app is a console application and the child apps are guis.

              
                        QProcess *abc = new QProcess(nullptr);
                        abc->setArguments(Args);
                        bool t=abc->startDetached(FileName);
                        qDebug() << "detacted = " << t;
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What version of Qt ?
      What OS ?
      What application ?
      Do you realize you are leaking QProcess objects ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Kent-DorfmanK Offline
        Kent-DorfmanK Offline
        Kent-Dorfman
        wrote on last edited by
        #3

        in addition to SGaist question, what happens if you try some of the other startDetached overloaded methods?

        If you meet the AI on the road, kill it.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved