From 1053529e4fddcd00891cbbc08cf4107e8335f873 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 7 Jun 2013 16:43:41 +0200 Subject: [PATCH] possible fix for no-shutdown of external app (ie harvid) --- gtk2_ardour/system_exec.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/system_exec.cc b/gtk2_ardour/system_exec.cc index 566c87dfbb..eb81c5fcb2 100644 --- a/gtk2_ardour/system_exec.cc +++ b/gtk2_ardour/system_exec.cc @@ -444,10 +444,13 @@ SystemExec::wait (int options) int status=0; if (pid==0) return -1; if (pid==::waitpid(pid, &status, options)) { - pid=0; - } - if (errno == ECHILD) { - pid=0; + if (WEXITSTATUS(status) || WIFSIGNALED(status)) { + pid=0; + } + } else { + if (errno == ECHILD) { + pid=0; + } } return status; }