Source

MQ for Sage toric varieties / trac_13211_quit.patch

The default branch has multiple heads

# HG changeset patch
# Parent 44389f71d6dce2b6143ea03ea51d1eb10d78e7d5

Kill instead of abandon gap process before rebuilding workspace

diff --git a/sage/interfaces/gap.py b/sage/interfaces/gap.py
--- a/sage/interfaces/gap.py
+++ b/sage/interfaces/gap.py
@@ -1157,7 +1157,7 @@
             if self.__use_workspace_cache and first_try:
                 print "A workspace appears to have been corrupted... automatically rebuilding (this is harmless)."
                 first_try = False
-                self._expect = None
+                self.quit(timeout=0)
                 expect.failed_to_start.remove(self.name())
                 gap_reset_workspace(verbose=False)
                 Expect._start(self, "Failed to start GAP.")