QProcess with External script that kills the main process.

So for my job i'm implementing an automatic update ability to the application.

Our application versions are controlled via the RPM system. When i run the RPM update command ("rpm -U {rpm file}"), the RPM file kills the current running application process, corrects the applications files / directories / configuration, and moves the new executable and an autostart script restarts the application.

My current implementation is the following:

MainWindow.cpp:

Receives message that an update is needed

Waits for the application to be idle before updating

Once idle, sanity checks where the new code is, and that it is applicable