SVN: wireless-net/trunk/sysconfig/interfaces/up.d/ppp/wlan-up.py

arekm arekm at pld-linux.org
Mon Nov 6 21:59:47 CET 2006


Author: arekm
Date: Mon Nov  6 21:59:46 2006
New Revision: 7944

Modified:
   wireless-net/trunk/sysconfig/interfaces/up.d/ppp/wlan-up.py
Log:
More logs while killing.

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	Mon Nov  6 21:59:46 2006
@@ -28,6 +28,7 @@
         try:
             os.kill(pid, signal.SIGTERM)
         except OSError, e:
+            fl.write("%s: unable to SIGTERM: %s [pid=%d]\n" % (time.asctime(time.gmtime()), e, pid))
             pass
         for i in [1, 2, 3, 4, 5]:
             if not pid_exists(pid):
@@ -37,8 +38,14 @@
             try:
                 os.kill(pid, signal.SIGKILL)
             except OSError, e:
+                fl.write("%s: unable to SIGKILL: %s [pid=%d]\n" % (time.asctime(time.gmtime()), e, pid))
                 pass
-        return not pid_exists(pid)
+        killed = not pid_exists(pid)
+        killed_msg = "killed"
+        if not killed:
+            killed_msg = "NOT killed"
+        fl.write("%s: killing result: %s [pid=%d]\n" % (time.asctime(time.gmtime()), killed_msg, pid))
+        return killed
     return False
 
 config = ConfigParser.ConfigParser()


More information about the pld-cvs-commit mailing list