Commit 52f21dd8 authored by Matteo Quintiliani's avatar Matteo Quintiliani

Added signal function for Windows


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@996 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent da2506b0
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy * Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it * quintiliani@ingv.it
* *
* $Id: nmxptool.c,v 1.162 2008-03-30 06:07:21 mtheo Exp $ * $Id: nmxptool.c,v 1.163 2008-03-31 07:21:03 mtheo Exp $
* *
*/ */
...@@ -164,6 +164,15 @@ int main (int argc, char **argv) { ...@@ -164,6 +164,15 @@ int main (int argc, char **argv) {
sa.sa_handler = SIG_IGN; sa.sa_handler = SIG_IGN;
sigaction(SIGHUP, &sa, NULL); sigaction(SIGHUP, &sa, NULL);
sigaction(SIGPIPE, &sa, NULL); sigaction(SIGPIPE, &sa, NULL);
#else
signal(SIGALRM, AlarmHandler);
signal(SIGINT, ShutdownHandler);
signal(SIGQUIT, ShutdownHandler);
signal(SIGTERM, ShutdownHandler);
signal(SIGHUP, SIG_IGN);
signal(SIGPIPE, SIG_IGN);
#endif #endif
/* Default is normal output */ /* Default is normal output */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment