aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-07-30 14:45:08 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-07-30 14:45:08 +0000
commit592fad0d8930ed2d4cfb9cb6323432caacaafe69 (patch)
tree89922f9577edfb2a88398a15dbb1ec4aff9e0cca
parentf38e293b02a63c09d381bbb566d77caa40af7749 (diff)
downloadbusybox-w32-592fad0d8930ed2d4cfb9cb6323432caacaafe69.tar.gz
busybox-w32-592fad0d8930ed2d4cfb9cb6323432caacaafe69.tar.bz2
busybox-w32-592fad0d8930ed2d4cfb9cb6323432caacaafe69.zip
use SIGTERM to kill off udhcpd, not SIGKILL
git-svn-id: svn://busybox.net/trunk/busybox@9046 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--networking/ifupdown.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index f703a5d87..b2ce2a091 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -555,8 +555,11 @@ static int dhcp_down(struct interface_defn_t *ifd, execfn *exec)
555{ 555{
556 int result = 0; 556 int result = 0;
557 if (execable("/sbin/udhcpc")) { 557 if (execable("/sbin/udhcpc")) {
558 /* SIGUSR2 forces udhcpc to release the current lease and go inactive,
559 * and SIGTERM causes udhcpc to exit. Signals are queued and processed
560 * sequentially so we don't need to sleep */
558 result = execute("kill -USR2 `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec); 561 result = execute("kill -USR2 `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
559 result += execute("kill -9 `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec); 562 result += execute("kill -TERM `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
560 } else if (execable("/sbin/pump")) { 563 } else if (execable("/sbin/pump")) {
561 result = execute("pump -i %iface% -k", ifd, exec); 564 result = execute("pump -i %iface% -k", ifd, exec);
562 } else if (execable("/sbin/dhclient")) { 565 } else if (execable("/sbin/dhclient")) {