In file process.cpp in function CProcess::RunProcess there is a
loop that calls ReadStdOut. ReadStdOut itself has a loop that
reads characters from stdout or stderr.
The problem is that the
buffer pointer gets reset if a partial read occurs (if it doesn't quite
reach a '\n' or goes past it).
I fixed it by moving the buffer and
pointer and placing them in the class description under private in
the CProcess class of process.h.
I added these 2 lines just
before the loop:
*outBuff = '\0';
// Read error/output pipes.
for ( ; ;
if (exitCode !=
commented out/removed these lines in
// *outBuff = '\0';
// char *chr =
The buffer and pointer could also be in CJob if more
that one process was allowed to run at one time (not the case
Log in to post a comment.