about summary refs log tree commit diff
path: root/pause.c
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2014-04-26 09:28:15 +0200
committerJuan RP <xtraeme@gmail.com>2014-04-26 09:29:39 +0200
commit7aecf46ec589a5bc49ae2392137bcd0e7468dd08 (patch)
tree2164dbf05eea99348d6a0bf893b9fd218bc9ee83 /pause.c
parent72c31feddc31ca0e9f5311a3133d26eef69de971 (diff)
downloadrunit-void-7aecf46ec589a5bc49ae2392137bcd0e7468dd08.tar.gz
runit-void-7aecf46ec589a5bc49ae2392137bcd0e7468dd08.tar.xz
runit-void-7aecf46ec589a5bc49ae2392137bcd0e7468dd08.zip
Add halt/pause utils from ignite.
Diffstat (limited to 'pause.c')
-rw-r--r--pause.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/pause.c b/pause.c
new file mode 100644
index 0000000..4825df6
--- /dev/null
+++ b/pause.c
@@ -0,0 +1,20 @@
+#include <unistd.h>
+#include <signal.h>
+
+static void
+nop(int sig)
+{
+}
+
+int
+main()
+{
+  signal(SIGTERM, nop);
+  signal(SIGINT, nop);
+  signal(SIGHUP, SIG_IGN);
+
+  pause();
+
+  return 0;
+}
+