summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-11-20 15:09:38 +0000
committerbde <bde@FreeBSD.org>1997-11-20 15:09:38 +0000
commit9eee7eb270fef77617e71de7dbe595105ac78277 (patch)
tree3f45e27f0df674b3f360c4d6deee3654c99e148c /lib
parent7a938e0797ad81f6dc8bb67d164c830d5a75b09d (diff)
downloadFreeBSD-src-9eee7eb270fef77617e71de7dbe595105ac78277.zip
FreeBSD-src-9eee7eb270fef77617e71de7dbe595105ac78277.tar.gz
stat() the correct file in execvp() so that the fine tuned errno handling
actually works.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c
index c083957..3b77ee9 100644
--- a/lib/libc/gen/exec.c
+++ b/lib/libc/gen/exec.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)exec.c 8.1 (Berkeley) 6/4/93";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: exec.c,v 1.6 1997/10/14 07:23:16 bde Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -283,7 +283,7 @@ retry: (void)execve(bp, argv, environ);
* We hope that the race for a stat() is unimportant.
*/
save_errno = errno;
- if (stat(argv[0], &sb) != 0)
+ if (stat(bp, &sb) != 0)
break;
if (save_errno == EACCES) {
eacces = 1;
OpenPOWER on IntegriCloud