Re: Pipes and interprocess communication
From: Rufus V. Smith (nospam_at_nospam.com)
Date: 09/01/04
- Next message: daniel kaplan: "Re: SetCapture"
- Previous message: James Brown: "Re: highlighting window"
- In reply to: Krishna Monian: "Pipes and interprocess communication"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 1 Sep 2004 16:56:09 -0400
"Krishna Monian" <KrishnaMonian@discussions.microsoft.com> wrote in message
news:FD8A86DF-0494-4B06-871B-4F0626DF04B3@microsoft.com...
> Hi All,
> I am writing an application which runs another application (passed as a
> command line argument) as a separate process. I redirect the stdout,
stderr
> and stdin of the process during creation as follows:
>
<program snipped>
>
> I then redirect the stdout of my program from the command line:
> myprog.exe > temp.txt 2>&1
>
> I also run the process separately and redirect its stdout and stderr to a
> file:
> process.exe > temp2.txt 2>&1
>
> However, some of the lines seem to go missing in the file created by
myprog.
> The original file created by the process is 15Kb in size. Hence, I think a
> buffer of 262144 should be enough for the pipe.
>
> Could anyone tell me what the problem could be?
Are you flushing your output at the end of myprog?
e.g. :
fflush(stdout);
Rufus
- Next message: daniel kaplan: "Re: SetCapture"
- Previous message: James Brown: "Re: highlighting window"
- In reply to: Krishna Monian: "Pipes and interprocess communication"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|