Workaround child process reaping race on Windows
commit4cbe399553be749391bec0a165da5818702dcaf0
authorPeter Grayson <pete@jpgrayson.net>
Mon, 23 Aug 2021 02:40:08 +0000 (22 22:40 -0400)
committerPeter Grayson <pete@jpgrayson.net>
Mon, 23 Aug 2021 03:25:44 +0000 (22 23:25 -0400)
tree290c1ded4b42d42dbd8839bc807198d41fdb0d4b
parent428f23074b1f737aca69c6f10d58ee8af3389cde
Workaround child process reaping race on Windows

On Windows, there is apparently a race between StGit attempting to kill its
child CatFileProcess at exit and those processes exiting themselves when
stdin is closed, such that the CatFileProcess _shutdown() methods will
sometimes (always?) get an OSError when attempting to kill these child
processes.

Since the end-goal is for these processes to be killed, the workaround is
to simply ignore the OSError exception if os.kill() fails.

Closes #78
stgit/lib/git/repository.py