[Zope-Checkins] SVN: Zope/trunk/ Issue 2113: testrunner ignoring
Ctrl-C.
Tres Seaver
tseaver at palladion.com
Wed Jul 5 10:40:45 EDT 2006
Log message for revision 68974:
Issue 2113: testrunner ignoring Ctrl-C.
Changed:
U Zope/trunk/doc/CHANGES.txt
U Zope/trunk/lib/python/Zope2/Startup/zopectl.py
-=-
Modified: Zope/trunk/doc/CHANGES.txt
===================================================================
--- Zope/trunk/doc/CHANGES.txt 2006-07-05 14:32:19 UTC (rev 68973)
+++ Zope/trunk/doc/CHANGES.txt 2006-07-05 14:40:45 UTC (rev 68974)
@@ -27,6 +27,8 @@
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.
@@ -47,4 +49,4 @@
http://codespeak.net/pipermail/z3-five/2006q2/001474.html
- The defaultView directive now only looks up views, not attributes.
-
\ No newline at end of file
+
Modified: Zope/trunk/lib/python/Zope2/Startup/zopectl.py
===================================================================
--- Zope/trunk/lib/python/Zope2/Startup/zopectl.py 2006-07-05 14:32:19 UTC (rev 68973)
+++ Zope/trunk/lib/python/Zope2/Startup/zopectl.py 2006-07-05 14:40:45 UTC (rev 68974)
@@ -258,14 +258,20 @@
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
More information about the Zope-Checkins
mailing list