diff options
| author | erdgeist <> | 2008-12-07 03:50:51 +0000 |
|---|---|---|
| committer | erdgeist <> | 2008-12-07 03:50:51 +0000 |
| commit | c6947b160f99278057df0770b849b46264b72229 (patch) | |
| tree | 8c5e543648458f7368d51906c53a9e1b45a8c364 /opentracker.c | |
| parent | ad8c9ee1efac171e5f3a8f41a630254ac88357a8 (diff) | |
Handle program end more politely
Diffstat (limited to 'opentracker.c')
| -rw-r--r-- | opentracker.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/opentracker.c b/opentracker.c index 022f561..1e996d9 100644 --- a/opentracker.c +++ b/opentracker.c | |||
| @@ -34,9 +34,10 @@ | |||
| 34 | #include "ot_livesync.h" | 34 | #include "ot_livesync.h" |
| 35 | 35 | ||
| 36 | /* Globals */ | 36 | /* Globals */ |
| 37 | time_t g_now_seconds; | 37 | time_t g_now_seconds; |
| 38 | char * g_redirecturl = NULL; | 38 | char * g_redirecturl = NULL; |
| 39 | uint32_t g_tracker_id; | 39 | uint32_t g_tracker_id; |
| 40 | volatile int g_opentracker_running = 1; | ||
| 40 | 41 | ||
| 41 | static char * g_serverdir = NULL; | 42 | static char * g_serverdir = NULL; |
| 42 | 43 | ||
| @@ -51,6 +52,7 @@ static void panic( const char *routine ) { | |||
| 51 | static void signal_handler( int s ) { | 52 | static void signal_handler( int s ) { |
| 52 | if( s == SIGINT ) { | 53 | if( s == SIGINT ) { |
| 53 | signal( SIGINT, SIG_IGN); | 54 | signal( SIGINT, SIG_IGN); |
| 55 | g_opentracker_running = 0; | ||
| 54 | 56 | ||
| 55 | trackerlogic_deinit(); | 57 | trackerlogic_deinit(); |
| 56 | exit( 0 ); | 58 | exit( 0 ); |
