svn commit: branches/uClibc_0_9_29/libc/unistd

vapier at uclibc.org vapier at uclibc.org
Sat Jan 5 17:30:18 UTC 2008


Author: vapier
Date: 2008-01-05 09:30:18 -0800 (Sat, 05 Jan 2008)
New Revision: 20756

Log:
Merge r19163 by vda from trunk:
execXp should go to next PATH dir on any error except ENOEXEC,
not just on ENOENT (in particular, on EPERM). At least glibc does so.
Fixing this.


Modified:
   branches/uClibc_0_9_29/libc/unistd/exec.c


Changeset:
Modified: branches/uClibc_0_9_29/libc/unistd/exec.c
===================================================================
--- branches/uClibc_0_9_29/libc/unistd/exec.c	2008-01-05 17:30:00 UTC (rev 20755)
+++ branches/uClibc_0_9_29/libc/unistd/exec.c	2008-01-05 17:30:18 UTC (rev 20756)
@@ -235,11 +235,11 @@
 
 	if (strchr(path, '/')) {
 		execve(path, argv, __environ);
-	CHECK_ENOEXEC:
 		if (errno == ENOEXEC) {
 			char **nargv;
 			EXEC_ALLOC_SIZE(size2) /* Do NOT add a semicolon! */
 			size_t n;
+	RUN_BIN_SH:
 			/* Need the dimension - 1.  We omit counting the trailing
 			 * NULL but we actually omit the first entry. */
 			for (n=0 ; argv[n] ; n++) {}
@@ -292,9 +292,9 @@
 
 				seen_small = 1;
 
-				if (errno != ENOENT) {
+				if (errno == ENOEXEC) {
 					path = s;
-					goto CHECK_ENOEXEC;
+					goto RUN_BIN_SH;
 				}
 
 			NEXT:




More information about the uClibc-cvs mailing list