Mail Archives: cygwin/2004/11/27/14:06:52
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 -