> From: tomgra...@gmail.com
> Hm.. well I definitely did learn a lot from this, and of course you
> are right it is a straightforward logical process. The main reason I
> say I wouldn't have got there is down to my intrinsic belief that I
> was to blame for the error (which I am used to being the case!) For
> example I did post a couple of related questions on the Perl monks
> website, but the rather thin suggestions there have been to imply I
> must be doing something wrong/have my environment set up incorrectly
> etc. which only served to cement that view - and I think your
> approach has been very different.
A crucial point is that it doesn't really matter who is wrong -- the
first thing is to discern the exact manner in which the failure
happened. After that, the question arises as to how to prevent the
failure. Debugging is always a matter of raising the hood and
examining how the failure happened in detail. (Conversely, there are
people who post to a mailing list saying "XYZ doesn't work and I've
fiddled with all inputs but nothing works." These people are
hopeless, because they will not attempt to *understand* what is going
In this case, we arrived at the point where we could see that the code
presumed that open() could not return 0 as a success condition. It
can be argued that one should never run Git without standard-input
being open, but that's a rather weak argument, especially in the face
of how easy it is to fix the code.
We could also ask why your Apache environment executes subprocesses
without having standard-input open (at least to /dev/null). That is
actually rather non-robust as well, as you've just discovered.
However, that is likely to be a lot of work, given the complexity of
In your case, you don't have to do the work to install a proper fix to
either Git or Apache because you can add "</dev/null".
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/groups/opt_out.