Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [SOLVED]Get notify when a running process(.exe) from windows is closed.

    C++ Gurus
    3
    8
    2336
    Loading More Posts
    • 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.
    • V
      vpwal last edited by

      Hi.
      Is there any C++ windows API or Qt way so that i can get a signal that this process is closed/quit.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Do you mean any process ? An external process ? Process that you started ?

        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 Reply Quote 0
        • V
          vpwal last edited by

          Hi

          An external process.

          1 Reply Last reply Reply Quote 0
          • G
            gyll last edited by

            probably the easiest and most portable way is to simply poll the existence of the process every NNN ms, for NNN>100ms this will cause minimal CPU load and you won't have to deal with catching OS-specific signals, or interfering with the message loop, etc

            1 Reply Last reply Reply Quote 0
            • V
              vpwal last edited by

              Did you mean using a timer so that it monitors all the processes?

              1 Reply Last reply Reply Quote 0
              • V
                vpwal last edited by

                Hi SGaist,

                Can i attach an external pid to QProcess and get signal when this attached process is closed.?

                1 Reply Last reply Reply Quote 0
                • SGaist
                  SGaist Lifetime Qt Champion last edited by

                  AFAIK, no there's not.

                  You might be interested by "this":http://msdn.microsoft.com/en-us/library/aa390425(VS.85).aspx

                  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 Reply Quote 0
                  • V
                    vpwal last edited by

                    Thanks.
                    I am looking on it.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post