invoking PSFTP through pipes on WIN2k

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Howdy folks, I'm hoping somebody has a solution to my problem:
I invoke psftp.exe through anonymous pipes using CreatePipe, then run
psftp using
CreateProcess. The code I use is simple, there many examples to do
this and it works...
but: there is an intermittent problem.

I read the output of psftp through the pipe and parse it. I always get
the "psftp>" string
at the output of each command as I should but sometimes, always at
different places,
it somehow gets "eaten", and then my app just hangs waining for input
that never comes.

I read others reporting similar problems with pipes on windows, they
are suggesting that the pipe
does not always get flushed, and anonymous pipes have no flush control
so I have 2 questions:
1. Is there a de-facto way of invoking plink/psftp and friends on
2. If not, would it make sense to use named pipes, as some have
suggested, for better
    flush control of these.
3. Is there any example code for this using named pipes.


Site Timeline