mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-26 16:37:44 +01:00
add SIGPIPE handler to catch JACK going away, etc
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3648 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d44c033d0f
commit
bfb65a6f76
1 changed files with 11 additions and 0 deletions
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
#include <signal.h>
|
||||
|
||||
#include <sigc++/bind.h>
|
||||
#include <gtkmm/settings.h>
|
||||
|
|
@ -223,6 +224,12 @@ fixup_bundle_environment ()
|
|||
|
||||
#endif
|
||||
|
||||
static void
|
||||
sigpipe_handler (int sig)
|
||||
{
|
||||
cerr << _("SIGPIPE received - JACK has probably died") << endl;
|
||||
}
|
||||
|
||||
#ifdef VST_SUPPORT
|
||||
/* this is called from the entry point of a wine-compiled
|
||||
executable that is linked against gtk2_ardour built
|
||||
|
|
@ -300,6 +307,10 @@ int main (int argc, char* argv[])
|
|||
|
||||
PBD::ID::init ();
|
||||
|
||||
if (::signal (SIGPIPE, sigpipe_handler)) {
|
||||
cerr << _("Cannot install SIGPIPE error handler") << endl;
|
||||
}
|
||||
|
||||
try {
|
||||
ui = new ARDOUR_UI (&argc, &argv);
|
||||
} catch (failed_constructor& err) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue