summaryrefslogtreecommitdiff
path: root/core/launcher/main.cpp
Unidiff
Diffstat (limited to 'core/launcher/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index 3ee5e26..5cf624b 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -349,24 +349,25 @@ void create_pidfile ( )
349 349
350void remove_pidfile ( ) 350void remove_pidfile ( )
351{ 351{
352 ::unlink ( pidfile_path ); 352 ::unlink ( pidfile_path );
353} 353}
354 354
355void handle_sigterm ( int sig ) 355void handle_sigterm ( int /* sig */ )
356{ 356{
357 if ( qApp ) 357 if ( qApp )
358 qApp-> quit ( ); 358 qApp-> quit ( );
359} 359}
360 360
361int main( int argc, char ** argv ) 361int main( int argc, char ** argv )
362{ 362{
363#ifndef SINGLE_APP 363#ifndef SINGLE_APP
364 ::signal( SIGCHLD, SIG_IGN ); 364 ::signal( SIGCHLD, SIG_IGN );
365 365
366 ::signal ( SIGTERM, handle_sigterm ); 366 ::signal ( SIGTERM, handle_sigterm );
367 ::signal ( SIGINT, handle_sigterm );
367 368
368 ::setsid ( ); 369 ::setsid ( );
369 ::setpgid ( 0, 0 ); 370 ::setpgid ( 0, 0 );
370 371
371 ::atexit ( remove_pidfile ); 372 ::atexit ( remove_pidfile );
372 create_pidfile ( ); 373 create_pidfile ( );