mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
* 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.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user