Re: [OT] POSIX question
On Mon, 28 Apr 2003 03:18:18 +1000, mistertrik at hotmail.com wrote:
> General question to any linux / unix gurus out there.
>
> I know how to use pipes, and I know what they do.
> Does anyone have a clue about how bash/csh/ksh etc handle them internally?
>
> I have to duplicate this feat, and I can't see my way clear without fudging
> an answer that involves a temporary file and simple input/output
> redirection.
>
> Any help appreciated, even rtfm if accompanied by links to said m.
> =====================================================
> .______<-------------------\__
> / _____<--------------------__|===
> ||_ <-------------------/
> \__| Mr Trick
Take a look at this:
http://www.RapidEuphoria.com/iolib.tar.gz
And also this:
http://www.geocities.com/jbrown1050/pipeio_tar_gz.html
The first will let you call the C functions for file IO and half-duplex
pipes.
The second will give you full duplex pipes, but is a lot harder to use.
It however
will let you redirect to a command. This one is built on the libc
function dup2(),
as well as the libc pipe() function.
'man 2 dup2' and 'man 2 pipe' will give you the details.
jbrown
--
http://www.fastmail.fm - Send your email first class
|
Not Categorized, Please Help
|
|