summaryrefslogtreecommitdiff
path: root/opentracker.c
diff options
context:
space:
mode:
authorerdgeist <>2008-12-07 03:50:51 +0000
committererdgeist <>2008-12-07 03:50:51 +0000
commitc6947b160f99278057df0770b849b46264b72229 (patch)
tree8c5e543648458f7368d51906c53a9e1b45a8c364 /opentracker.c
parentad8c9ee1efac171e5f3a8f41a630254ac88357a8 (diff)
Handle program end more politely
Diffstat (limited to 'opentracker.c')
-rw-r--r--opentracker.c8
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 */
37time_t g_now_seconds; 37time_t g_now_seconds;
38char * g_redirecturl = NULL; 38char * g_redirecturl = NULL;
39uint32_t g_tracker_id; 39uint32_t g_tracker_id;
40volatile int g_opentracker_running = 1;
40 41
41static char * g_serverdir = NULL; 42static char * g_serverdir = NULL;
42 43
@@ -51,6 +52,7 @@ static void panic( const char *routine ) {
51static void signal_handler( int s ) { 52static 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 );