aboutsummaryrefslogtreecommitdiff
path: root/posix/execvp.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-04-14 21:20:51 +0000
committerUlrich Drepper <drepper@redhat.com>2005-04-14 21:20:51 +0000
commit506cbf1f43a3bba63b9f4dd6d5a9a1d15f0dcf2c (patch)
treeae94b10219ae5184bda4b83c0142886822412c9c /posix/execvp.c
parent806bc96abb96212c38ef54ea80a86b45647161eb (diff)
downloadglibc-506cbf1f43a3bba63b9f4dd6d5a9a1d15f0dcf2c.tar
glibc-506cbf1f43a3bba63b9f4dd6d5a9a1d15f0dcf2c.tar.gz
glibc-506cbf1f43a3bba63b9f4dd6d5a9a1d15f0dcf2c.tar.bz2
glibc-506cbf1f43a3bba63b9f4dd6d5a9a1d15f0dcf2c.zip
* posix/execvp.c (execvp): Use file name including path when
trying to run it with shell. * posix/Makefile: Add rules to build and run tst-execvp3. * posix/tst-execvp3.c: New file.
Diffstat (limited to 'posix/execvp.c')
-rw-r--r--posix/execvp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/posix/execvp.c b/posix/execvp.c
index 0abfa7007c..6f4e4b8566 100644
--- a/posix/execvp.c
+++ b/posix/execvp.c
@@ -133,14 +133,14 @@ execvp (file, argv)
else
startp = (char *) memcpy (name - (p - path), path, p - path);
- /* Try to execute this name. If it works, execv will not return. */
+ /* Try to execute this name. If it works, execve will not return. */
__execve (startp, argv, __environ);
if (errno == ENOEXEC)
{
if (script_argv == NULL)
{
- script_argv = allocate_scripts_argv (file, argv);
+ script_argv = allocate_scripts_argv (startp, argv);
if (script_argv == NULL)
{
/* A possible EACCES error is not as important as