delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/11/27/14:06:52

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Date: Sat, 27 Nov 2004 14:06:49 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Cygwin files and devices philosophy
Message-ID: <20041127190649.GA31577@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
References: <coaaes$q1c$1 AT sea DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 61 DOT 0411271310231 DOT 14489 AT slinky DOT cs DOT nyu DOT edu>
Mime-Version: 1.0
In-Reply-To: <Pine.GSO.4.61.0411271310231.14489@slinky.cs.nyu.edu>
User-Agent: Mutt/1.4.1i

On Sat, Nov 27, 2004 at 01:32:00PM -0500, Igor Pechtchanski wrote:
>>In my case, I provide an option for a terminal program what device
>>should be used to open the file.  I don't want to restrict what devices
>>are or are not allowed, except by using function calls to the Posix API
>>to determine if the required functionality can be met.
>
>"\\.\COM37" is not POSIX.  Cygwin is POSIX.  You're trying to use POSIX
>functions (isatty) on a non-POSIX device -- the result is unspecified
>(which means that the above behavior is perfectly valid, as is any
>other).  If you want to write portable code, why not use the equivalent
>POSIX devices?  "/dev/ttyS36" should work, and so should "/dev/com37"
>(according to the documentation).

And, in reality, isatty should (and does, AFAICT) return 0 for anything
opened with \\.\COMn.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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