Log message for revision 68973: Issue 2113: testrunner ignoring Ctrl-C. Changed: U Zope/branches/2.10/doc/CHANGES.txt U Zope/branches/2.10/lib/python/Zope2/Startup/zopectl.py
-=- Modified: Zope/branches/2.10/doc/CHANGES.txt =================================================================== --- Zope/branches/2.10/doc/CHANGES.txt 2006-07-05 14:19:07 UTC (rev 68972) +++ Zope/branches/2.10/doc/CHANGES.txt 2006-07-05 14:32:19 UTC (rev 68973) @@ -18,6 +18,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. Modified: Zope/branches/2.10/lib/python/Zope2/Startup/zopectl.py =================================================================== --- Zope/branches/2.10/lib/python/Zope2/Startup/zopectl.py 2006-07-05 14:19:07 UTC (rev 68972) +++ Zope/branches/2.10/lib/python/Zope2/Startup/zopectl.py 2006-07-05 14:32:19 UTC (rev 68973) @@ -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 _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins