Author: Brian Kearns <[email protected]>
Branch:
Changeset: r60701:80aa79e32429
Date: 2013-01-29 21:35 -0500
http://bitbucket.org/pypy/pypy/changeset/80aa79e32429/
Log: silence warnings from timeout_killer
diff --git a/pypy/module/thread/test/support.py
b/pypy/module/thread/test/support.py
--- a/pypy/module/thread/test/support.py
+++ b/pypy/module/thread/test/support.py
@@ -2,6 +2,7 @@
import time
import thread
import os
+import errno
from pypy.interpreter.gateway import interp2app, unwrap_spec
from pypy.module.thread import gil
@@ -28,7 +29,12 @@
def kill():
for x in range(delay * 10):
time.sleep(0.1)
- os.kill(pid, 0)
+ try:
+ os.kill(pid, 0)
+ except OSError, e:
+ if e.errno == errno.ESRCH: # no such process
+ return
+ raise
os.kill(pid, 9)
print "process %s killed!" % (pid,)
thread.start_new_thread(kill, ())
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit