From e239f780eabdb6194ebd8b87d00d328301c92aa5 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Wed, 4 Jun 2008 21:11:17 -0500 Subject: [PATCH] Print an an error message if JACK cannot connect. Ignore SIGPIPE (that JACK sends). --- Timeline/main.C | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Timeline/main.C b/Timeline/main.C index e621195..56174b2 100644 --- a/Timeline/main.C +++ b/Timeline/main.C @@ -83,6 +83,8 @@ ensure_dirs ( void ) #include +#include + int main ( int argc, char **argv ) @@ -108,6 +110,8 @@ main ( int argc, char **argv ) init_boxtypes(); + signal( SIGPIPE, SIG_IGN ); + if ( ! ensure_dirs() ) FATAL( "Cannot create required directories" ); @@ -119,7 +123,8 @@ main ( int argc, char **argv ) /* we don't really need a pointer for this */ engine = new Engine; - engine->init(); + if ( ! engine->init() ) + FATAL( "Could not connect to JACK!" ); /* always start stopped (please imagine for me a realistic * scenario requiring otherwise */