diff options
| author | Bruce Evans <bde@FreeBSD.org> | 1996-11-18 19:24:47 +0000 |
|---|---|---|
| committer | Bruce Evans <bde@FreeBSD.org> | 1996-11-18 19:24:47 +0000 |
| commit | 766631018fb28b0bceac3fb57712fffd8a61c42f (patch) | |
| tree | 9fd59f74b62f80f3eb78ea783bc45328692d4299 /lib/libc/gen/exec.c | |
| parent | 1ad652a54c103dbdd891e81ceedae09ade0c3f45 (diff) | |
Notes
Diffstat (limited to 'lib/libc/gen/exec.c')
| -rw-r--r-- | lib/libc/gen/exec.c | 6 |
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; |
