|

楼主 |
发表于 2004-4-28 12:46:40
|
显示全部楼层
ok,解决。
试过了kill -9也不行,kill -1也把进程杀掉了的。
不过我找到ifup-dhcp的脚本片断,已经解决。把for循环加在1,2语句之间就可了,这个for循环应该是延时的功能,
continue是什么??
没有用过continue函数,
,我猜应该是用来跳出for循环吧。1表示跳出一级。
#1
kill -1 `cat /var/run/dhcpcd-eth0.pid`
for ((wait=0; wait<30; wait++)); do
if test -d /proc/$i; then usleep 300000
else continue 1
fi
if [ $wait = 20 ]; then
echo process $i still not dead,sending SIGKILL
kill -KILL $i &>/dev/null
fi
done
#2
/sbin/dhcpcd -H -D -R -N -t 999999 eth0 |
|