killdaemons: take file argument explicitely stable
authorPatrick Mezard <patrick@mezard.eu>
Mon, 20 Aug 2012 22:36:51 +0200
branchstable
changeset 1128 7f09e7ac63a7
parent 1127 79d7aa832cf4
child 1129 b90bb2b0826a
killdaemons: take file argument explicitely It makes it easier to use as a generic replacement for kill utility, mostly for Windows tests. [ original upstream message ]
tests/killdaemons.py
--- a/tests/killdaemons.py	Sun Aug 19 18:06:15 2012 +0200
+++ b/tests/killdaemons.py	Mon Aug 20 22:36:51 2012 +0200
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-import os, time, errno, signal
+import os, sys, time, errno, signal
 
 if os.name =='nt':
     import ctypes
@@ -49,5 +49,6 @@
         pass
 
 if __name__ == '__main__':
-    killdaemons(os.environ['DAEMON_PIDS'])
+    path, = sys.argv[1:]
+    killdaemons(path)