This is the mail archive of the
mailing list for the Cygwin project.
RE: Looking for named pipe solution in cygwin
- From: Randall R Schulz <rrschulz at cris dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 11 Dec 2002 16:09:15 -0800
- Subject: RE: Looking for named pipe solution in cygwin
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.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html