summaryrefslogtreecommitdiff
path: root/patch/restartsig.c
diff options
context:
space:
mode:
Diffstat (limited to 'patch/restartsig.c')
-rw-r--r--patch/restartsig.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/patch/restartsig.c b/patch/restartsig.c
new file mode 100644
index 0000000..adb61b5
--- /dev/null
+++ b/patch/restartsig.c
@@ -0,0 +1,16 @@
+static int restart = 0;
+
+void
+sighup(int unused)
+{
+ Arg a = {.i = 1};
+ quit(&a);
+}
+
+void
+sigterm(int unused)
+{
+ Arg a = {.i = 0};
+ quit(&a);
+}
+