diff options
author | Juan RP <xtraeme@gmail.com> | 2014-04-26 09:28:15 +0200 |
---|---|---|
committer | Juan RP <xtraeme@gmail.com> | 2014-04-26 09:29:39 +0200 |
commit | 7aecf46ec589a5bc49ae2392137bcd0e7468dd08 (patch) | |
tree | 2164dbf05eea99348d6a0bf893b9fd218bc9ee83 /pause.c | |
parent | 72c31feddc31ca0e9f5311a3133d26eef69de971 (diff) | |
download | runit-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.c | 20 |
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; +} + |