From: Stephen Boyd Date: Thu, 31 Jan 2013 18:05:09 GMT Subject: Re: [PATCH 2/3] run-command: Be more informative about what failed Message-ID: <510AB255.40302@codeaurora.org> In-Reply-To: <7vfw1hiami.fsf@alter.siamese.dyndns.org> On 01/31/13 08:24, Junio C Hamano wrote: > Stephen Boyd writes: > >> While debugging an error with verify_signed_buffer() the error >> messages from run-command weren't very useful: >> >> error: cannot create pipe for gpg: Too many open files >> error: could not run gpg. >> >> because they didn't indicate *which* pipe couldn't be created. > For the message emitted here with your update (or without for that > matter) to be useful, it has to hold that there is a single leaker, > that leaker fails in this codepath, and that there is nobody else > involved. Otherwise, you may be able to tell that one caller could > not create its stdin, but the reason it couldn't may be because > somebody else consumed all the available file descriptors. > > I am not opposed to this change per-se, but I am not sure that > saying "stdin" etc. makes the message more useful for the purpose of > debugging. It helped me avoid firing up gdb, but if you don't see much use feel free to ignore this patch. > >> For example, the above error now prints: >> >> error: cannot create stderr pipe for gpg: Too many open files >> error: could not run gpg. > I'd prefer to see these names spelled out (e.g. "standard error") > in any case. Sure, I can do that. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation