diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index c2337f64ec..0252cb1986 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -18,6 +18,7 @@ */ #include +#include #include #include @@ -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) {