aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-07-30 14:45:08 +0000
committerEric Andersen <andersen@codepoet.org>2004-07-30 14:45:08 +0000
commit15b588559bf75ebe15bc6ff29f3d591c4f35c0e8 (patch)
tree89922f9577edfb2a88398a15dbb1ec4aff9e0cca /networking
parente71e760a9945dffbf2e6238e70768dd52948abe5 (diff)
downloadbusybox-w32-15b588559bf75ebe15bc6ff29f3d591c4f35c0e8.tar.gz
busybox-w32-15b588559bf75ebe15bc6ff29f3d591c4f35c0e8.tar.bz2
busybox-w32-15b588559bf75ebe15bc6ff29f3d591c4f35c0e8.zip
use SIGTERM to kill off udhcpd, not SIGKILL
Diffstat (limited to 'networking')
-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")) {