[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: stderr/stdout/stdin [was lua system interaction on win]
- From: Martin Spernau <martin@...>
- Date: Wed, 21 Aug 2002 12:11:56 +0200
David Burgess wrote:
See the earlier mail from read.beyond.data
a) use createpipe(), createprocess() is the only way I
know to get stderr. However CreatePipe() and ReadFile()
is a shaky piece of work on win 9x systems. There are
examples of doing this in MSDN.
Okay so this would be a job for a lib
b) afaik you cant. You can read from stdin OR write to
Ok. I can live with that for now. makes the communication more limited,
but that's still better than temp-files
demos the output event
Okay, this has gottem me really far along my way.
Now I have some further questions concerning 'piping'
The sample code 'opens' the STDOUT of the external process as _INPUT
a) how would I (also) connect STDERR as a filehandle to read from?
b) how do I write to the STDIN of the above external process?
writeto(h) -- does this connect to STDIN of above pipe?
What I'm basically after is controlling another commandline tool
(ispell, curl etc) from within a lua-script. It would also be important
to catch STDERR, of course.
Thanks for all the help already,