From: Dana Jansens Date: Sat, 4 Jan 2003 19:18:30 +0000 (+0000) Subject: restart on HUP X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=cef2672ec88e60855e16229c2c95fdbcc9c59c2f;p=chaz%2Fopenbox restart on HUP --- 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: