Thread (19 messages) flat view 19 messages, 4 authors, 2016-06-15

Re: [PATCH 2/2] git: continue alias lookup on EACCES errors

From: Jeff King <hidden>
Date: 2016-06-15 22:53:25

Possibly related (same subject, not in this thread)

On Wed, Mar 28, 2012 at 04:18:51PM -0400, Jeff King wrote:
+int sane_execvp(const char *file, char * const argv[])
+{
+	int ret = execvp(file, argv);
+	if (ret < 0 && errno == EACCES && !file_in_path_is_nonexecutable(file))
+		errno = ENOENT;
+	return ret;
+}
Hmm, this should check for (*file == '/') to handle absolute paths
properly. If you have an absolute path, I would tend to think that we
should never rewrite it into ENOENT (so if you have "/foo/bar", even if
"foo" is inaccessible, ENOENT is still the right response).

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help