Commit c19eb104 authored by Tres Seaver's avatar Tres Seaver

Issue 2113: testrunner ignoring Ctrl-C.

parent a11790a3
......@@ -18,6 +18,8 @@ Zope Changes
Bugs Fixed
- Collector #2113: 'zopectl test' masked Ctrl-C.
- OFS Image: Image and File updated to use isinstance(data, str)
and raises TypeError upon encountering unicode objects.
......
......@@ -258,14 +258,20 @@ class ZopeCmd(ZDCmd):
pid = os.fork()
if pid == 0: # child
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):
print "test [args]+ -- run unit / functional tests."
print " See $ZOPE_HOME/bin/test.py --help for syntax."
def main(args=None):
# This is exactly like zdctl.main(), but uses ZopeCtlOptions and
# 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