]> git.llucax.com Git - software/pymin.git/commitdiff
Replace time.sleep() for signal.pause() in the ProcessManager test.
authorLeandro Lucarella <llucax@gmail.com>
Mon, 12 Nov 2007 23:51:31 +0000 (20:51 -0300)
committerLeandro Lucarella <llucax@gmail.com>
Tue, 13 Nov 2007 03:04:11 +0000 (00:04 -0300)
pymin/procman.py

index e0f3017976bb5b112ccfba8cc0d863998ced1f33..810481d3a2c9c8ada37f2515aae06a8a53190305 100644 (file)
@@ -176,8 +176,9 @@ if __name__ == '__main__':
     procman.call('test', ('sleep', '5'), notify)
     procman.start('test-service')
 
     procman.call('test', ('sleep', '5'), notify)
     procman.start('test-service')
 
+    print "Esperando...", [pi.name for pi in procman.namemap.values()]
     while procman.pidmap:
     while procman.pidmap:
-        time.sleep(1)
+        signal.pause()
         if sig == signal.SIGCHLD:
             sig = None
             procman.sigchild_handler(sig)
         if sig == signal.SIGCHLD:
             sig = None
             procman.sigchild_handler(sig)