This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Looking for named pipe solution in cygwin


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]