Jun Omae committed 276db3d

1.0.2dev: ignore an `ESRCH` error while killing child process which has not been waited on Cygwin in ``

Closes #10958.

Comments (0)

Files changed (1)


     def terminate_nix(process):
         import os
         import signal
-        return os.kill(, signal.SIGTERM)
+        try:
+            os.kill(, signal.SIGTERM)
+        except OSError, e:
+            # If the process has already finished and has not been
+            # waited for, killing it raises an ESRCH error on Cygwin
+            import errno
+            if e.errno != errno.ESRCH:
+                raise
     if sys.platform == 'win32':
         return terminate_win(process)