[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The primitiveness of pipe



> From: John Robert LoVerso <loverso%osf.org@gec-epl.co.uk>
> 
> Of course, pipe(2) is nice, but it would be nice to also have a full duplex
> hook available, too.  I.e., socketpair() or STREAMS pipe.

Well, on many systems, you've got that any, since that's how pipes are often
implemented. Just use exec and <> to make them read-write. You might
even just be able to do exec { >[1=0] } and exec { <[0=1] }. Something like:

{ cmd1 <[0=1] } | { cmd2 >[1=0] }

should have cmd1 and cmd2 happily nattering to themselves. not at all
system-dependent, of course :-).