Ensuring QProcess termination on termination of its parent QThread
===

I am writing a code within Qt where I am using multiple threads (Qthreads) to launch command-line processes in a manner shown in the code snippet below:

    void test_streamer_thread::run()
    {
        QProcess    start_process;
        ...
    
        ret_status = start_process.execute("some_cmd.exe",some_args);
        start_process.close();
    }

Once launched, the process goes on infinitely (shows up as a separate process in the windows task manager). However, when the application terminates, the process still continues to exist. How do I ensure that this process terminates on termination of the application launching it.

Regards,

Saurabh Gandhi