summaryrefslogtreecommitdiffstats
path: root/02_exercise/signal_handler.h
diff options
context:
space:
mode:
authorNiklas Halle <niklas@niklashalle.net>2020-05-25 19:42:24 +0200
committerNiklas Halle <niklas@niklashalle.net>2020-05-25 19:42:24 +0200
commit589ec07d1ec29e9e33714fcc0f213e79c1f36a9a (patch)
tree785e8d77493c0eeac4ea94799daf24f75ad2016d /02_exercise/signal_handler.h
parent41775b83ad93264b487bf0dc353b145922ee6d73 (diff)
downloadbetriebssysteme-589ec07d1ec29e9e33714fcc0f213e79c1f36a9a.tar.gz
betriebssysteme-589ec07d1ec29e9e33714fcc0f213e79c1f36a9a.zip
DO NOT MERGE, use previous. Trying to get ctrl-z to work.. no success yet, maybe breaks stufffixing_signals
Diffstat (limited to '02_exercise/signal_handler.h')
-rw-r--r--02_exercise/signal_handler.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/02_exercise/signal_handler.h b/02_exercise/signal_handler.h
new file mode 100644
index 0000000..b30c5ec
--- /dev/null
+++ b/02_exercise/signal_handler.h
@@ -0,0 +1,13 @@
+#ifndef BETRIEBSYSTEME_SIGNAL_HANDLER_H
+#define BETRIEBSYSTEME_SIGNAL_HANDLER_H
+
+#include <signal.h>
+
+static volatile sig_atomic_t stop_issued = 0;
+static volatile sig_atomic_t interrupt_issued = 0;
+
+void signal_handler(int sig);
+
+void handle_interrupt(pid_t pid);
+
+#endif //BETRIEBSYSTEME_SIGNAL_HANDLER_H