[OpenWrt-Devel] [PATCH] libubox: handle SIGTERM in uloop_run()
Alexandru Ardelean
ardeleanalex at gmail.com
Thu Aug 7 03:51:26 EDT 2014
procd sends SIGTERM to finish a process.
Though the process stops, anything after uloop_run()
( uloop_done() and other cleanup ) does not seem to run.
Signed-off-by: Alexandru Ardelean <ardeleanalex at gmail.com>
---
uloop.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/uloop.c b/uloop.c
index d293edb..c9c3c0f 100644
--- a/uloop.c
+++ b/uloop.c
@@ -572,6 +572,7 @@ static void uloop_setup_signals(bool add)
s = old_sigint;
}
+ sigaction(SIGTERM, &s, &old_sigint);
sigaction(SIGINT, &s, &old_sigint);
if (!uloop_handle_sigchld)
--
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list