about summary refs log tree commit diff
path: root/posix/execvp.c
diff options
context:
space:
mode:
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