[BusyBox-cvs] CVS update of busybox/networking (ifupdown.c)
Erik Andersen
andersen at codepoet.org
Fri Jul 30 14:45:09 UTC 2004
Date: Friday, July 30, 2004 @ 08:45:08
Author: andersen
Path: /var/cvs/busybox/networking
Modified: ifupdown.c (1.49 -> 1.50)
use SIGTERM to kill off udhcpd, not SIGKILL
Index: busybox/networking/ifupdown.c
diff -u busybox/networking/ifupdown.c:1.49 busybox/networking/ifupdown.c:1.50
--- busybox/networking/ifupdown.c:1.49 Fri Jul 30 08:31:01 2004
+++ busybox/networking/ifupdown.c Fri Jul 30 08:45:08 2004
@@ -555,8 +555,11 @@
{
int result = 0;
if (execable("/sbin/udhcpc")) {
+ /* SIGUSR2 forces udhcpc to release the current lease and go inactive,
+ * and SIGTERM causes udhcpc to exit. Signals are queued and processed
+ * sequentially so we don't need to sleep */
result = execute("kill -USR2 `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
- result += execute("kill -9 `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
+ result += execute("kill -TERM `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
} else if (execable("/sbin/pump")) {
result = execute("pump -i %iface% -k", ifd, exec);
} else if (execable("/sbin/dhclient")) {
More information about the busybox-cvs
mailing list