On xfce4-terminal, the call to kill the git cat-file process is not sufficient: the process does not exit and the caller is not returned to the prompt.
Adding a call to close stdin makes the process exit cleanly. Suggested-by: Christian Häggström <[email protected]> Signed-off-by: Sima Baymani <[email protected]> --- I think adding the stdin.close is more safe (at the moment) than removing it alltogether, so I've sent in the patch for that. If you prefer a patch that replaces os.kill entirely, I'd be happy to resend. I've run tests for both alternatives and haven't run into any trouble. But experience says that it would be too good to be universally true... I've also added credit to the person who came up with the final answer, credit where credit's due =) Regarding tests, I've run them as instructed - both on xterm and on xfce4-terminal. At work, where this problem occurred: all tests run fine and no problems. I also ran the commands that usually give me trouble, with good results. However, at home (an old Debian install - wheezy testing I think), the tests were a bit unstable - BUT they were unstable for both a clean build and a build with the patch applied. In addition, if I re-run the failing tests individually, they are green. My interpretation is that it has more to do with my home setup rather than the tests or stg. I can post the output if anyone is interested. stgit/lib/git.py | 1 + 1 file changed, 1 insertion(+) diff --git a/stgit/lib/git.py b/stgit/lib/git.py index 37a1989..8addc46 100644 --- a/stgit/lib/git.py +++ b/stgit/lib/git.py @@ -578,6 +578,7 @@ class CatFileProcess(object): def __shutdown(self): p = self.__proc if p: + p.stdin.close() os.kill(p.pid(), signal.SIGTERM) p.wait() def cat_file(self, sha1): -- 1.7.10.4 _______________________________________________ stgit-users mailing list [email protected] https://mail.gna.org/listinfo/stgit-users
