aboutsummaryrefslogtreecommitdiff
path: root/src/com_reload.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/com_reload.c')
-rw-r--r--src/com_reload.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/com_reload.c b/src/com_reload.c
new file mode 100644
index 0000000..7ff1206
--- /dev/null
+++ b/src/com_reload.c
@@ -0,0 +1,17 @@
+#include "genrc.h"
+
+int
+com_reload(void)
+{
+ PIDLIST pids;
+
+ if (genrc_no_reload)
+ return com_restart();
+ pidlist_init(&pids);
+ if (get_pid_list(genrc_pid_closure, &pids))
+ return 1;
+ pidlist_kill(&pids, genrc_signal_reload);
+ return 0;
+}
+
+

Return to:

Send suggestions and report system problems to the System administrator.