summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1995-08-07 19:39:37 +0000
committerRoland McGrath <roland@redhat.com>1995-08-07 19:39:37 +0000
commit9fd3c2453bea58967741fc5247e57ea1e75290e8 (patch)
tree9a79f4d5395135bf24ec0bed202d0bf213904e68
parenta4e66c61c0066040d93de1f598a043dec1ce78b3 (diff)
downloadgunmake-9fd3c2453bea58967741fc5247e57ea1e75290e8.tar.gz
(exec_command): Correctly use ARGV[0] for script name when running shell
directly.
-rw-r--r--job.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/job.c b/job.c
index 7bb336c..daefc5c 100644
--- a/job.c
+++ b/job.c
@@ -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];