]> git.cworth.org Git - apitrace/blobdiff - os_win32.cpp
Various changes to the flushing code.
[apitrace] / os_win32.cpp
index f220ae5ec46dbbcd7368ca0204a36a669d26c835..90ce8d3a74a41a5a660cc71547d27898d0d834e1 100644 (file)
@@ -24,6 +24,7 @@
  **************************************************************************/
 
 #include <windows.h>
+#include <signal.h>
 #include <string.h>
 #include <stdio.h>
 
@@ -133,4 +134,13 @@ Abort(void)
 #endif
 }
 
+void
+CatchInterrupts(void (*func)(int))
+{
+    signal(SIGINT, func);
+    signal(SIGHUP, func);
+    signal(SIGTERM, func);
+}
+
+
 } /* namespace OS */