From: Johannes Sixt Date: Thu, 31 Mar 2011 20:56:39 GMT Subject: Re: [PATCH 1/4] teach wait_or_whine a "quiet" mode Message-ID: <201103312256.39317.j6t@kdbg.org> In-Reply-To: <20110331184342.GA16906@sigill.intra.peff.net> On Donnerstag, 31. März 2011, Jeff King wrote: > The wait_or_whine function will complain to stderr in a few > cases: > > 1. We fail to actually waitpid() correctly. > > 2. The child died of a signal. > > 3. The child returned exit code 127, indicating a missing > command to exec after forking. > > We already have a silent_exec_failure flag to silence (3). > Let's convert that into a "quiet" flag to also silence (2). I'm rather negative on controlling these two error reports with the same flag because... > This shouldn't result in signal failure being silent for > existing users of silent_exec_failure, since they already > will need to be checking the return code and complaining for > the case of a non-zero exit code. This reasoning is not correct. Error reporting in the routines in run-command.c is structured such that callers have to check the return code, but they do not report errors themselves. Therefore, even if callers request silent_exec_failure, they will not do their own error reporting if there is some other failure. -- Hannes