(exec_command): Correctly use ARGV[0] for script name when running shell

directly.
This commit is contained in:
Roland McGrath 1995-08-07 19:39:37 +00:00
parent a4e66c61c0
commit 9fd3c2453b

2
job.c
View File

@ -1114,7 +1114,7 @@ exec_command (argv, envp)
new_argv = (char **) alloca ((1 + argc + 1) * sizeof (char *));
new_argv[0] = shell;
new_argv[1] = program;
new_argv[1] = argv[0];
while (argc > 0)
{
new_argv[1 + argc] = argv[argc];