diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-11-29 14:10:00 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-11-30 09:53:47 +0100 |
commit | 1542738826dd0ed26cfc8f5e2e37ffe80f1b9676 (patch) | |
tree | 7eb7a6bfdb7f4217449741942253c2115e6ad5d7 /signal.c | |
parent | 501c6d70a6a7357652e2a4fb1ad5856d90bde29b (diff) | |
download | unitd-1542738826dd0ed26cfc8f5e2e37ffe80f1b9676.tar unitd-1542738826dd0ed26cfc8f5e2e37ffe80f1b9676.zip |
Rename to unitd, clean up CMakeLists.txt
Diffstat (limited to 'signal.c')
-rw-r--r-- | signal.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,7 +1,9 @@ /* + * Copyright (C) 2015 Matthias Schiffer <mschiffer@universe-factory.net> + * + * Based on "procd" by: * Copyright (C) 2013 Felix Fietkau <nbd@openwrt.org> * Copyright (C) 2013 John Crispin <blogic@openwrt.org> - * Copyright (C) 2015 Matthias Schiffer <mschiffer@universe-factory.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 2.1 @@ -18,7 +20,7 @@ #include <unistd.h> -#include "procd.h" +#include "unitd.h" static void do_reboot(void) { @@ -51,7 +53,7 @@ static void signal_shutdown(int signal, siginfo_t *siginfo, void *data) DEBUG(1, "Triggering %s\n", msg); if (event) - procd_shutdown(event); + unitd_shutdown(event); } struct sigaction sa_shutdown = { @@ -61,7 +63,7 @@ struct sigaction sa_shutdown = { static void signal_crash(int signal, siginfo_t *siginfo, void *data) { - ERROR("Rebooting as procd has crashed\n"); + ERROR("Rebooting as unitd has crashed\n"); do_reboot(); } @@ -80,7 +82,7 @@ struct sigaction sa_dummy = { .sa_flags = SA_SIGINFO }; -void procd_signal(void) +void unitd_signal(void) { signal(SIGPIPE, SIG_IGN); if (getpid() != 1) |