Re: [RFC/PATCH 0/3] fix "Funny: git -p submodule summary"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 27, 2009 at 11:06:40AM +0100, Johannes Sixt wrote:

> - Note that run_command returns the negated exit code, therefore, we must 
> negate it again in the call to exit(). Without this t6030 failed. (And 
> negative exit codes causes grief on Windows because bash for some reason 
> does not recognize that as failure.)

Oops, indeed. And you made me realize that I forgot to run the test
script against this patchset.

However, I'm not sure just negating the exit code is sufficient.
run_command can return codes in the 10000 range for its own internal
errors. We don't want to pass those out through exit, which will
truncate them to 8 bits.

> - The close() calls can overwrite errno.

Good point.

> And since fork() should not  (cannot?) fail with ENOENT, it's safe to
> remove the #ifdef __MINGW32__.

Yeah, I thought of that, but I was worried it might make the code a
little bit non-obvious (but it does clean up an ifdef, which is ugly,
too).

Thanks for your feedback. I'll squash in your fixes and repost 2/3 later
today.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux