From cef2672ec88e60855e16229c2c95fdbcc9c59c2f Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 4 Jan 2003 19:18:30 +0000 Subject: [PATCH] restart on HUP --- src/openbox.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openbox.cc b/src/openbox.cc index 6b5251b5..e9d12500 100644 --- a/src/openbox.cc +++ b/src/openbox.cc @@ -60,14 +60,16 @@ void Openbox::signalHandler(int signal) switch (signal) { case SIGHUP: // XXX: Do something with HUP? Really shouldn't, we get this when X shuts - // down and hangs-up on us. + // down and hangs-up on us. we also get a SIGPIPE. + printf("Caught HUP signal. Restarting.\n"); + instance->restart(); + break; case SIGINT: case SIGTERM: case SIGPIPE: printf("Caught signal %d. Exiting.\n", signal); instance->shutdown(); - break; case SIGFPE: case SIGSEGV: -- 2.45.2