From: Albert Dvornik Date: Mon, 26 Apr 2010 11:47:10 GMT Subject: Re: [PATCH] start_command: close cmd->err descriptor when fork/spawn fails Message-ID: In-Reply-To: <4BD53749.6040708@viscovery.net> On Mon, Apr 26, 2010 at 2:48 AM, Johannes Sixt wrote: > Am 4/26/2010 3:15, schrieb bert Dvornik: [...] >> I'm not sure why (or if) this problem hasn't cropped up under Linux. >> The non-Windows code *does* try to check for execve() failures in the >> child, in addition to the fork() failures. > > The problem does show up on Linux if you trigger the right error, such as > with this patch: [...] > +       echo "#!/bin/frobnicuty" >testrepo/.git/hooks/pre-receive && > +       echo exit 1 >>testrepo/.git/hooks/pre-receive && Ah, that makes sense! Thank you for clearing up the mystery. Junio: would you like me to resend with an updated commit message, and maybe the addition of Hannes's test as well? --bert