summaryrefslogtreecommitdiff
path: root/lib/libc/gen/exec.c
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1996-11-18 19:24:47 +0000
committerBruce Evans <bde@FreeBSD.org>1996-11-18 19:24:47 +0000
commit766631018fb28b0bceac3fb57712fffd8a61c42f (patch)
tree9fd59f74b62f80f3eb78ea783bc45328692d4299 /lib/libc/gen/exec.c
parent1ad652a54c103dbdd891e81ceedae09ade0c3f45 (diff)
Notes
Diffstat (limited to 'lib/libc/gen/exec.c')
-rw-r--r--lib/libc/gen/exec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c
index 2410ce974492..72b6db43b1da 100644
--- a/lib/libc/gen/exec.c
+++ b/lib/libc/gen/exec.c
@@ -200,6 +200,12 @@ execvp(name, argv)
}
bp = buf;
+ /* If it's an empty path name, fail in the usual POSIX way. */
+ if (*name == '\0') {
+ errno = ENOENT;
+ return (-1);
+ }
+
/* Get the path we're searching. */
if (!(path = getenv("PATH")))
path = _PATH_DEFPATH;