From 932242eee7d99559bf8e0b4cec2b140f567a8149 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Fri, 8 Dec 2006 22:53:32 +0000 Subject: Logic now actually initialized and deinitialized --- opentracker.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'opentracker.c') diff --git a/opentracker.c b/opentracker.c index 10b7d87..ac3fda1 100644 --- a/opentracker.c +++ b/opentracker.c @@ -224,8 +224,11 @@ bailout: } void graceful( int s ) { - signal( SIGINT, SIG_IGN ); - deinit_logic(); + if( s == SIGINT ) { + signal( SIGINT, SIG_IGN); + deinit_logic(); + exit( 0 ); + } } int main() @@ -245,7 +248,8 @@ int main() panic("io_fd"); signal( SIGINT, graceful ); - init_logic( "." ); + if( init_logic( "." ) == -1 ) + panic("Logic not started"); io_wantread(s); -- cgit v1.2.3