diff --git a/src/common/execio.c b/src/common/execio.c --- a/src/common/execio.c +++ b/src/common/execio.c @@ -40,6 +40,7 @@ int execio_open(struct execio **rem, con int counter; int counter2; + int maxfds; /* create two pipes to facilitate communication with child */ if(pipe(pipe_write)) @@ -111,6 +112,7 @@ int execio_open(struct execio **rem, con if(counter < pipe_read[1]) counter = pipe_read[1]; counter2 = 0; + maxfds = counter; while(counter > 2) { if(!close(counter)) @@ -119,7 +121,7 @@ int execio_open(struct execio **rem, con } /* stderr is the only stream we haven't confiscated atm - just for fun - I will confiscate it later, though, to support parsing error messages */ - fprintf(stderr, "closed %d fds before execing \"%s\"\n", counter2, progname); + fprintf(stderr, "closed %d/%d fds before execing \"%s\"\n", counter2, maxfds, progname); /* now exec: execvp uses interpreter to find the file to exec