SVN: wireless-net/trunk/sysconfig/interfaces/up.d/ppp/wlan-up.py
arekm
arekm at pld-linux.org
Tue Nov 7 10:07:10 CET 2006
Author: arekm
Date: Tue Nov 7 10:07:10 2006
New Revision: 7948
Modified:
wireless-net/trunk/sysconfig/interfaces/up.d/ppp/wlan-up.py
Log:
Longer sleep time.
Modified: wireless-net/trunk/sysconfig/interfaces/up.d/ppp/wlan-up.py
==============================================================================
--- wireless-net/trunk/sysconfig/interfaces/up.d/ppp/wlan-up.py (original)
+++ wireless-net/trunk/sysconfig/interfaces/up.d/ppp/wlan-up.py Tue Nov 7 10:07:10 2006
@@ -7,9 +7,10 @@
def pid_exists(pid):
try:
os.kill(pid, 0)
- return 1
+ return True
except OSError, err:
return err.errno == errno.EPERM
+ return False
def get_iface_pid(iface):
pid_file = "/var/run/%s.pid" % iface
@@ -31,13 +32,14 @@
except OSError, e:
fl.write("%s: unable to SIGTERM: %s [pid=%d]\n" % (time.asctime(time.gmtime()), e, pid))
pass
- for i in range(10):
+ for i in range(15):
if not pid_exists(pid):
break
time.sleep(1)
if pid_exists(pid):
try:
os.kill(pid, signal.SIGKILL)
+ time.sleep(1)
except OSError, e:
fl.write("%s: unable to SIGKILL: %s [pid=%d]\n" % (time.asctime(time.gmtime()), e, pid))
pass
More information about the pld-cvs-commit
mailing list