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:
Paul Davis 2008-07-25 20:01:48 +00:00
parent d44c033d0f
commit bfb65a6f76

View file

@ -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) {