summaryrefslogtreecommitdiff
path: root/src/events.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2000-10-15 23:08:47 +0000
committersabetts <sabetts>2000-10-15 23:08:47 +0000
commit8adb6de4f3310672589eb27cf4fc161e46d81cdd (patch)
treef61e6c7ed0ebdde48f74aa533233194bc8125797 /src/events.c
parentcce91d966d0b7ccda8de348f431d7b4e234665cd (diff)
downloadratpoison-8adb6de4f3310672589eb27cf4fc161e46d81cdd.zip
added --kill and --restart to kill and restart a running ratpoison process
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/events.c b/src/events.c
index a4f3ce7..f40aed7 100644
--- a/src/events.c
+++ b/src/events.c
@@ -239,6 +239,19 @@ static void
client_msg (XClientMessageEvent *ev)
{
PRINT_DEBUG ("Recieved client message.\n");
+
+ if (ev->message_type == rp_restart)
+ {
+ PRINT_DEBUG ("Restarting\n");
+ clean_up ();
+ execvp(myargv[0], myargv);
+ }
+ else if (ev->message_type == rp_kill)
+ {
+ PRINT_DEBUG ("Exiting\n");
+ clean_up ();
+ exit (EXIT_SUCCESS);
+ }
}
static void