From: Junio C Hamano Date: Fri, 25 Dec 2009 07:46:58 GMT Subject: Re: [RFC PATCH 1/2] Report exec errors from run-command Message-ID: <7vhbrfebrh.fsf@alter.siamese.dyndns.org> In-Reply-To: <7vr5qjecbb.fsf@alter.siamese.dyndns.org> Junio C Hamano writes: > Ilari Liusvaara writes: > >> Previously run-command was unable to report errors happening in exec >> call. Change it to pass errno from failed exec to errno value at >> return. >> >> The errno value passing can be done by opening close-on-exec pipe and >> piping the error code through in case of failure. In case of success, >> close-on-exec closes the pipe on successful exec and parent process >> gets end of file on read. > > Thanks; I think overall this is a good idea, even though I have no clue > if WIN32 side wants a similar support. By the way, at least it should be pretty straightforward to add a test or two for [1/2] if not [2/2].