aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Pavlik <rpavlik@iastate.edu>2011-10-28 17:04:15 (GMT)
committerRyan Pavlik <rpavlik@iastate.edu>2011-10-31 15:54:08 (GMT)
commit42f647553a129e6bf5ce80567ce207da07049283 (patch)
tree5ac2ce7131ab94a610aa3d36bd657ad2bb801164
parentb0779c413b2b8554224158a38e9921103724bf77 (diff)
downloadfluxbox-42f647553a129e6bf5ce80567ce207da07049283.zip
fluxbox-42f647553a129e6bf5ce80567ce207da07049283.tar.bz2
fluxbox.cc: ifdef the signals windows doesn't have.
-rw-r--r--src/fluxbox.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index ff44e9f..8260897 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -289,13 +289,16 @@ Fluxbox::Fluxbox(int argc, char **argv,
289 SignalHandler &sigh = SignalHandler::instance(); 289 SignalHandler &sigh = SignalHandler::instance();
290 sigh.registerHandler(SIGSEGV, this); 290 sigh.registerHandler(SIGSEGV, this);
291 sigh.registerHandler(SIGFPE, this); 291 sigh.registerHandler(SIGFPE, this);
292 sigh.registerHandler(SIGPIPE, this); // e.g. output sent to grep
293 sigh.registerHandler(SIGTERM, this); 292 sigh.registerHandler(SIGTERM, this);
294 sigh.registerHandler(SIGINT, this); 293 sigh.registerHandler(SIGINT, this);
294#ifndef _WIN32
295 sigh.registerHandler(SIGPIPE, this); // e.g. output sent to grep
295 sigh.registerHandler(SIGCHLD, this); 296 sigh.registerHandler(SIGCHLD, this);
296 sigh.registerHandler(SIGHUP, this); 297 sigh.registerHandler(SIGHUP, this);
297 sigh.registerHandler(SIGUSR1, this); 298 sigh.registerHandler(SIGUSR1, this);
298 sigh.registerHandler(SIGUSR2, this); 299 sigh.registerHandler(SIGUSR2, this);
300#endif
301
299 // 302 //
300 // setup timer 303 // setup timer
301 // This timer is used to we can issue a safe reconfig command. 304 // This timer is used to we can issue a safe reconfig command.
@@ -891,6 +894,7 @@ void Fluxbox::handleSignal(int signum) {
891 static int re_enter = 0; 894 static int re_enter = 0;
892 895
893 switch (signum) { 896 switch (signum) {
897#ifndef _WIN32
894 case SIGCHLD: // we don't want the child process to kill us 898 case SIGCHLD: // we don't want the child process to kill us
895 // more than one process may have terminated 899 // more than one process may have terminated
896 while (waitpid(-1, 0, WNOHANG | WUNTRACED) > 0); 900 while (waitpid(-1, 0, WNOHANG | WUNTRACED) > 0);
@@ -904,12 +908,15 @@ void Fluxbox::handleSignal(int signum) {
904 case SIGUSR2: 908 case SIGUSR2:
905 reconfigure(); 909 reconfigure();
906 break; 910 break;
911#endif
907 case SIGSEGV: 912 case SIGSEGV:
908 abort(); 913 abort();
909 break; 914 break;
910 case SIGFPE: 915 case SIGFPE:
911 case SIGINT: 916 case SIGINT:
917#ifndef _WIN32
912 case SIGPIPE: 918 case SIGPIPE:
919#endif
913 case SIGTERM: 920 case SIGTERM:
914 shutdown(); 921 shutdown();
915 break; 922 break;