Handle SIGTERM instead of SIGQUIT.
SIGQUIT is supposed to produce a core dump. We don't want that.
This commit is contained in:
committed by
Rodrigo Moya
parent
befa850712
commit
794ec7dbb6
18
shell/main.c
18
shell/main.c
@ -267,13 +267,13 @@ idle_cb (gchar **uris)
|
||||
#ifndef G_OS_WIN32
|
||||
|
||||
static void
|
||||
quit_signal (gint sig)
|
||||
term_signal (gint sig)
|
||||
{
|
||||
EShell *shell;
|
||||
|
||||
g_return_if_fail (sig == SIGQUIT);
|
||||
g_return_if_fail (sig == SIGTERM);
|
||||
|
||||
g_print ("Received quit signal...\n");
|
||||
g_print ("Received terminate signal...\n");
|
||||
|
||||
shell = e_shell_get_default ();
|
||||
|
||||
@ -282,20 +282,20 @@ quit_signal (gint sig)
|
||||
}
|
||||
|
||||
static void
|
||||
setup_quit_signal (void)
|
||||
setup_term_signal (void)
|
||||
{
|
||||
struct sigaction sa, osa;
|
||||
|
||||
sigaction (SIGQUIT, NULL, &osa);
|
||||
sigaction (SIGTERM, NULL, &osa);
|
||||
|
||||
sa.sa_flags = 0;
|
||||
sigemptyset (&sa.sa_mask);
|
||||
sa.sa_handler = quit_signal;
|
||||
sigaction (SIGQUIT, &sa, NULL);
|
||||
sa.sa_handler = term_signal;
|
||||
sigaction (SIGTERM, &sa, NULL);
|
||||
}
|
||||
|
||||
#else
|
||||
#define setup_quit_signal() (void)0
|
||||
#define setup_term_signal() (void)0
|
||||
#endif
|
||||
|
||||
static GOptionEntry entries[] = {
|
||||
@ -621,7 +621,7 @@ main (gint argc, gchar **argv)
|
||||
gconf_client_set_bool (client, key, FALSE, NULL);
|
||||
}
|
||||
|
||||
setup_quit_signal ();
|
||||
setup_term_signal ();
|
||||
|
||||
if (evolution_debug_log) {
|
||||
gint fd;
|
||||
|
||||
Reference in New Issue
Block a user