summaryrefslogtreecommitdiff
path: root/dev_d.c
diff options
context:
space:
mode:
Diffstat (limited to 'dev_d.c')
-rw-r--r--dev_d.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/dev_d.c b/dev_d.c
index c091f11c28..eaf9b1dc12 100644
--- a/dev_d.c
+++ b/dev_d.c
@@ -39,6 +39,7 @@ static int run_program(char *name)
{
pid_t pid;
int fd;
+ char *argv[3];
dbg("running %s", name);
@@ -54,7 +55,12 @@ static int run_program(char *name)
dup2(fd, STDERR_FILENO);
}
close(fd);
- execv(name, main_argv);
+
+ argv[0] = name;
+ argv[1] = main_argv[1];
+ argv[2] = NULL;
+
+ execv(name, argv);
dbg("exec of child failed");
exit(1);
case -1: