Looking for named pipe solution in cygwin

Randall R Schulz rrschulz@cris.com
Wed Dec 11 17:06:00 GMT 2002


Cary,


At 13:06 2002-12-11, Cary Lewis wrote:
>I have a follow up, can I allocate my own /dev/ttyX port, or a pseudo tty?
>
>If I can allocate a device, then I can implement the fifo using that.


Using a pty like a pipe is a dubious proposition at best.

If you set the modes "raw" enough, you can probably make sure the data 
passes through unaltered, but the throughput characteristics are not likely 
to be as good as what you'd get with a pipe. You may also find that 
throughput is asymmetric, since ptys, like ttys, tend to be optimized for 
much higher volume of output than input.

You could argue that it's reasonable to expect that in raw mode balanced 
throughput might be obtained, but that presumes a special case is made for 
this. Since ptys aren't meant for high-volume data throughput (they're 
designed to emulate the tty driver with user-level processes on both ends 
instead of having hardware on one side and a user-level process on the 
other), they may well not be coded to optimize the raw case for throughput 
and may still do a lot of (ultimately no-op) processing on each character.

See the man page for "stty" to find out what is the equivalent of "raw" in 
the Sys V termio.

I must admit that this is all pretty much a hunch based on my knowledge of 
actual Unix systems. How much of that knowledge applies to Cygwin ptys is 
completely unknown to me.


Randy  


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list