I have a BASH script run (QProcess blocking) in a QThread (in C++). This BASH script tars lots of files and can run for 1/2 hour.
In case the user wants to shutdown my program I need to kill my BASH script. But how? QThread::Quit will wait for the BASH program to terminate before processing signals, QThread::Terminate documentation says it MAY kill a thread immediately.
I want the equivalent of 'kill -9 myscript'. Is there a proper Qt way to do this?
waitForXxx
methods.QProcess::kill
to kill the process.QProcess
's signals to get notified when the process changes state, e.g. is finished.