diff options
author | Robin Gareus <robin@gareus.org> | 2013-06-07 16:43:41 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-06-07 16:43:41 +0200 |
commit | 1053529e4fddcd00891cbbc08cf4107e8335f873 (patch) | |
tree | 2c1d00df8f3267e1515fb7378488559dbc530aac /gtk2_ardour | |
parent | b13c5bff54799374ddeced0325f641e5ce449165 (diff) |
possible fix for no-shutdown of external app (ie harvid)
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/system_exec.cc | 11 |
1 files 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; } |