On Wed, Feb 12, 2014 at 3:49 PM, Sima Baymani <[email protected]> wrote:
> [baymanix@tesla]$ strace -p 21896
> Process 21896 attached
> read(0,
>
> So for some reason, git is waiting for more input. If I add this line,
> the problem (of course) goes away:
>
> [baymanix@tesla stgit-0.17.1]$ diff -u stgit/lib/git.py stgit/lib/git.py.sima
> --- stgit/lib/git.py    2014-02-12 15:40:04.775543849 +0100
> +++ stgit/lib/git.py.sima    2014-02-12 15:39:06.934818420 +0100
> @@ -579,6 +579,7 @@
>          p = self.__proc
>          if p:
>              print "git.py:CatFileProcess:__shutdown calling os.kill", p.pid()
> +            p.stdin.close()
>              os.kill(p.pid(), signal.SIGTERM)
>              print "git.py:CatFileProcess:__shutdown calling p.wait", p.pid()
>              p.wait()
>
> Any idea to why this is happening?
> Have I messed something up on my system or is it a bug?

Well, I'd say you're about done. You've debugged the problem and fixed
it; all that's left is to submit a patch and take credit for your
work.

I'm not sure why you're seeing this behavior and others don't, but it
does seem polite to close git cat-file's stdin when we want to kill
it. In fact, a glance at the git source code (builtin/cat-file.c)
suggests that closing stdin makes cat-file exit volontarily, which
should make the os.kill call unnecessary. If that's the case, a patch
that replaces kill with close would be even better.

-- 
Karl Wiberg, [email protected]
   subrabbit.wordpress.com
   www.treskal.com/kalle

_______________________________________________
stgit-users mailing list
[email protected]
https://mail.gna.org/listinfo/stgit-users

Reply via email to