On Wed, Mar 28, 2012 at 11:31:10AM -0700, Junio C Hamano wrote: > > If I understood Junio correctly, then checking for ENOENT and EACCES > > should be enough. > > > > Example: when I try > > > > :; mkdir $HOME/cannotread > > :; chmod -x $HOME/cannotread > > :; echo nonsense >$HOME/bin/cat > > :; chmod -x $HOME/bin/cat > > :; PATH=$HOME/cannotread:$HOME/bin/cat:/usr/local/bin:/usr/bin:/bin > > :; cat /etc/fstab > > > > the shell uses /bin/cat without complaint. > > Yeah, but I think that the case Peff is worried about is: > > $ >~/bin/nosuch > $ nosuch > nosuch: Permission denied Right. My reading of your suggestion was that we would differentiate those two cases, which one cannot do simply from the return value and errno after execvp. The former case (inaccessible directory) is common and probably harmless. The latter (non-executable file) is rare and probably an actual error we should point out. I'd also be OK with saying that the latter is too rare to worry about, and simply accept it as collateral damage (or we could even flag it with test_expect_failure and leave it for somebody else to work on later if they care). -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