summaryrefslogtreecommitdiff
path: root/src/events.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2003-10-15 22:26:19 +0000
committersabetts <sabetts>2003-10-15 22:26:19 +0000
commit0064759b73fd747eda2b28d5d89ab7d5c3cacba9 (patch)
tree31c46c07f0cd495e02958c5693001c5cd70398ff /src/events.c
parentf6780b3be38416b4a533de850f546c6f8aa8c5b8 (diff)
downloadratpoison-0064759b73fd747eda2b28d5d89ab7d5c3cacba9.zip
* src/globals.c (rp_hook_db): add hooks quit and restart
(rp_quit_hook): new global (rp_restart_hook): likewise * src/events.c (handle_signals): call the restart and quit hooks
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/events.c b/src/events.c
index 6a6d868..85548a4 100644
--- a/src/events.c
+++ b/src/events.c
@@ -775,6 +775,8 @@ handle_signals ()
if (hup_signalled > 0)
{
+ PRINT_DEBUG (("Restarting\n"));
+ hook_run (&rp_restart_hook);
clean_up ();
execvp(myargv[0], myargv);
}
@@ -782,6 +784,7 @@ handle_signals ()
if (kill_signalled > 0)
{
PRINT_DEBUG (("Exiting\n"));
+ hook_run (&rp_quit_hook);
clean_up ();
exit (EXIT_SUCCESS);
}