Skip to content

Commit 08dc697

Browse files
committed
GUI: When killing processes leave a message in log
When ug process doesn't respond to termination GUI needs to kill it. This makes the return code equal to 9 and GUI complains about a crash. Without a message in the log this could have been confusing.
1 parent 4b5eaeb commit 08dc697

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gui/QT/window/ultragrid_window.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,10 @@ void UltragridWindow::outputAvailable(){
205205
void UltragridWindow::start(){
206206
if(process.processId() > 0){
207207
process.terminate();
208-
if(!process.waitForFinished(1000))
208+
if(!process.waitForFinished(1000)){
209+
log.write("UltraGrid process could not be terminated gracefully. Killing...\n");
209210
process.kill();
211+
}
210212
return;
211213
}
212214

@@ -254,6 +256,7 @@ void UltragridWindow::stopPreview(){
254256
* can be created. Here we wait 0.5s to allow the preview process
255257
* exit gracefully. If it is still running after that we kill it */
256258
if(!previewProcess.waitForFinished(500)){
259+
log.write("Preview could not be terminated gracefully. Killing...\n");
257260
previewProcess.kill();
258261
}
259262
}

0 commit comments

Comments
 (0)