diff options
Diffstat (limited to 'src/events.c')
-rw-r--r-- | src/events.c | 13 |
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 |