delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/11/19:31:02

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <5.2.0.9.2.20021211154523.02a05888@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
Date: Wed, 11 Dec 2002 16:09:15 -0800
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: RE: Looking for named pipe solution in cygwin
In-Reply-To: <3E2D8043936AD611AF7D00508B5E9F4B28D569@server3.mobilecom.c
om>
Mime-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019