aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/process.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c
index 73c46945..d7e9f703 100644
--- a/src/process.c
+++ b/src/process.c
@@ -163,12 +163,13 @@ int monitor(char *cmdname, int pid, int numfds, int *fds, int reexec, int quiet,
cmdargc=0;
poptParseArgvString(tmpstr,&cmdargc,&tmpargs);
- cmdargs=malloc( (cmdargc+1) * sizeof(char *) );
+ cmdargs=malloc( (cmdargc+2) * sizeof(char *) );
cmdargs[0]=strdup("initlog");
for (z=0;z<(cmdargc);z++) {
cmdargs[z+1]=tmpargs[z];
}
- processArgs(cmdargc,cmdargs,1);
+ cmdargs[cmdargc+1]=NULL;
+ processArgs(cmdargc+1,cmdargs,1);
}
}
}