Commit 7acd3324 authored by Tres Seaver's avatar Tres Seaver

Issue 2113: testrunner ignoring Ctrl-C.

parent ca7fe95b
...@@ -27,6 +27,8 @@ Zope Changes ...@@ -27,6 +27,8 @@ Zope Changes
Bugs Fixed Bugs Fixed
- Collector #2113: 'zopectl test' masked Ctrl-C.
- OFS Image: Image and File updated to use isinstance(data, str) - OFS Image: Image and File updated to use isinstance(data, str)
and raises TypeError upon encountering unicode objects. and raises TypeError upon encountering unicode objects.
...@@ -47,4 +49,4 @@ Zope Changes ...@@ -47,4 +49,4 @@ Zope Changes
http://codespeak.net/pipermail/z3-five/2006q2/001474.html http://codespeak.net/pipermail/z3-five/2006q2/001474.html
- The defaultView directive now only looks up views, not attributes. - The defaultView directive now only looks up views, not attributes.
\ No newline at end of file
...@@ -258,14 +258,20 @@ class ZopeCmd(ZDCmd): ...@@ -258,14 +258,20 @@ class ZopeCmd(ZDCmd):
pid = os.fork() pid = os.fork()
if pid == 0: # child if pid == 0: # child
os.execv(self.options.python, args) os.execv(self.options.python, args)
else:
os.waitpid(pid, 0) # Parent process running (execv replaces process in child
while True:
try:
os.waitpid(pid, 0)
except (OSError, KeyboardInterrupt):
continue
else:
break
def help_test(self): def help_test(self):
print "test [args]+ -- run unit / functional tests." print "test [args]+ -- run unit / functional tests."
print " See $ZOPE_HOME/bin/test.py --help for syntax." print " See $ZOPE_HOME/bin/test.py --help for syntax."
def main(args=None): def main(args=None):
# This is exactly like zdctl.main(), but uses ZopeCtlOptions and # This is exactly like zdctl.main(), but uses ZopeCtlOptions and
# ZopeCmd instead of ZDCtlOptions and ZDCmd, so the default values # ZopeCmd instead of ZDCtlOptions and ZDCmd, so the default values
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment