diff --git a/ChangeLog b/ChangeLog index 030e94c1..3edb53ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,9 @@ Changes since version 0.70.0: - Fixed WPrefs crash when clicking on the menu editor to keep the current menu (Alexey Voinov ) - Added patch to fix some gnome issues (Les Schaffer ) +- SIGTERM is now handled and saves the internal state before exiting (like + SIGHUP and SIGINT already do). Now a "kill wmaker_pid" will exit cleanly + saving dock/clip/session information on exit. Changes since version 0.65.1: diff --git a/src/startup.c b/src/startup.c index 7f731004..9c6e4fdf 100644 --- a/src/startup.c +++ b/src/startup.c @@ -279,7 +279,7 @@ handleExitSig(int sig) * the select() is returned becaused of the signal, even if * there are no X events in the queue */ WDelayedActionSet++; - } else if (sig == SIGINT || sig == SIGHUP) { + } else if (sig==SIGTERM || sig==SIGINT || sig==SIGHUP) { #ifdef SYS_SIGLIST_DECLARED wwarning(_("got signal %i (%s) - exiting...\n"), sig, sys_siglist[sig]); #else @@ -842,12 +842,11 @@ StartUp(Bool defaultScreenOnly) sig_action.sa_handler = handleExitSig; /* Here we set SA_RESTART for safety, because SIGUSR1 may not be handled - * immediately. - * -Dan */ + * immediately. -Dan */ sig_action.sa_flags = SA_RESTART; -/* sigaction(SIGTERM, &sig_action, NULL);*/ - sigaction(SIGINT, &sig_action, NULL); - sigaction(SIGHUP, &sig_action, NULL); + sigaction(SIGTERM, &sig_action, NULL); + sigaction(SIGINT, &sig_action, NULL); + sigaction(SIGHUP, &sig_action, NULL); sigaction(SIGUSR1, &sig_action, NULL); sigaction(SIGUSR2, &sig_action, NULL);