From: Jonathan Nieder Date: Tue, 31 Aug 2010 19:35:15 GMT Subject: Re: [PATCH 1/2] tests: make test_must_fail more verbose Message-ID: <20100831193515.GV2315@burratino> In-Reply-To: <20100831180618.GB15020@sigill.intra.peff.net> Jeff King wrote: > On Tue, Aug 31, 2010 at 12:10:55PM -0500, Jonathan Nieder wrote: >> Can the exit status (e.g. from a shell function) be negative? > > I don't believe so. Both bash and dash complain about "return -1" (and > POSIX says the number must be "an unsigned decimal integer"). Thanks for checking; missed that. It is clearer in POSIX that the exit status from an external command will be truncated to an 8-bit unsigned integer, which as you say is the most important thing.