Mercurial > audlegacy
diff src/audlegacy/signals.c @ 4834:38b491487bd8
renamed dbus symbol to audlegacy
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Thu, 21 May 2009 19:17:02 +0900 |
parents | 901cd268f0ca |
children | aed7b7a97932 |
line wrap: on
line diff
--- a/src/audlegacy/signals.c Sat Mar 28 19:27:30 2009 +0900 +++ b/src/audlegacy/signals.c Thu May 21 19:17:02 2009 +0900 @@ -96,7 +96,7 @@ sigemptyset(&waitset); sigaddset(&waitset, SIGPIPE); - sigaddset(&waitset, SIGSEGV); + sigaddset(&waitset, SIGSEGV); sigaddset(&waitset, SIGINT); sigaddset(&waitset, SIGTERM); @@ -186,7 +186,7 @@ sigemptyset(&waitset); sigaddset(&waitset, SIGPIPE); - sigaddset(&waitset, SIGSEGV); + sigaddset(&waitset, SIGSEGV); sigaddset(&waitset, SIGINT); sigaddset(&waitset, SIGTERM); @@ -251,9 +251,9 @@ return old_action.sa_handler; } -/* +/* * A version of signal() that works more reliably across different - * platforms. It: + * platforms. It: * a. restarts interrupted system calls * b. does not reset the handler * c. blocks the same signal within the handler @@ -268,8 +268,8 @@ } -/* sets up blocking signals for pthreads. - * linuxthreads sucks and needs this to make sigwait(2) work +/* sets up blocking signals for pthreads. + * linuxthreads sucks and needs this to make sigwait(2) work * correctly. --nenolod * * correction -- this trick does not work on linuxthreads. @@ -282,12 +282,12 @@ sigemptyset(&blockset); sigaddset(&blockset, SIGPIPE); - sigaddset(&blockset, SIGSEGV); + sigaddset(&blockset, SIGSEGV); sigaddset(&blockset, SIGINT); sigaddset(&blockset, SIGTERM); if(pthread_sigmask(SIG_BLOCK, &blockset, NULL)) - g_print("pthread_sigmask() failed.\n"); + g_print("pthread_sigmask() failed.\n"); } static gboolean @@ -310,33 +310,33 @@ static void signal_session_quit_cb(EggSMClient *client, gpointer user_data) { - g_print("Session quit requested. Saving state and shutting down.\n"); + g_print("Session quit requested. Saving state and shutting down.\n"); aud_quit(); } static void signal_session_save_cb(EggSMClient *client, const char *state_dir, gpointer user_data) { - g_print("Session save requested. Saving state.\n"); + g_print("Session save requested. Saving state.\n"); aud_config_save(); } #endif -void +void signal_handlers_init(void) { #ifdef USE_EGGSM EggSMClient *client; client = egg_sm_client_get (); - if (client != NULL) + if (client != NULL) { egg_sm_client_set_mode (EGG_SM_CLIENT_MODE_NORMAL); g_signal_connect (client, "quit", G_CALLBACK (signal_session_quit_cb), NULL); g_signal_connect (client, "save-state", G_CALLBACK (signal_session_save_cb), NULL); - + } #endif