Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 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: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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/