diff options
Diffstat (limited to 'src/process.c')
-rw-r--r-- | src/process.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c index 3dca28e3..307fd98d 100644 --- a/src/process.c +++ b/src/process.c @@ -67,7 +67,7 @@ int forkCommand(char **args, int *outfd, int *errfd, int *cmdfd, int quiet) { fdcmd = fdpipe[1]; *cmdfd = fdpipe[0]; } else { - fdcmd = open("/dev/null",O_WRONLY"); + fdcmd = open("/dev/null",O_WRONLY); } ourpid = getpid(); if ((pid = fork())==-1) { @@ -79,7 +79,6 @@ int forkCommand(char **args, int *outfd, int *errfd, int *cmdfd, int quiet) { * fucks up and we segfault or something, we don't kill rc.sysinit. */ if ( (cmdfd&&!pid) || (pid &&!cmdfd)) { /* parent */ - close(fdin); close(fdout); close(fderr); close(fdcmd); @@ -133,7 +132,7 @@ int forkCommand(char **args, int *outfd, int *errfd, int *cmdfd, int quiet) { int monitor(char *cmdname, int pid, int numfds, int *fds, int reexec, int quiet, int debug) { struct pollfd *pfds; - char *buf;=malloc(8192*sizeof(char)); + char *buf; char *outbuf=NULL; char *tmpstr=NULL; int x,y,rc=-1; |