From: cgf AT cygnus DOT com (Christopher G. Faylor) Subject: Re: Can outsiders get simple questions answered? 26 Dec 1998 06:00:08 GMT Message-ID: <761u18$e6b$1@cronkite.cygnus.com> References: <367F31DC DOT B8E71A57 AT sdrc DOT com> <36811E54 DOT 995A0AF8 DOT cygnus DOT gnu-win32 AT sdrc DOT com> X-Newsreader: trn 4.0-test63 (15 March 1998) In article <36811E54 DOT 995A0AF8 DOT cygnus DOT gnu-win32 AT sdrc DOT com>, Dan Hensley wrote: > Many thanks to all of you who responded. I guess my question wasn't so simple >after all, but it's good to see the responses! :-) For those who are curious, >here's some background: I originally wrote a FORTRAN program for HP-UX, which as >part of its input, would allow the user to enter something either via a barcode >reader or keyboard using the select() function. About a year ago, I had to start >porting this program to NT. I discovered that MS FORTRAN 4.0 is a horrible >compiler, and that the MS select() function only worked with sockets (as the cygwin >developers had discovered). Then I discovered cygwin, which seems to be the only >way I'll solve my problem. I was very impressed to see that the select function >works like it does on Unix. So to cut out the rest of the details, I'm still >trying to get this functionality to work. I discovered that in notty mode, >select() works differently from tty mode (extra required), so I need to run in >tty mode. If you are testing serial code using console/tty to test it, then you are not really testing the same thing. In cygwin a 'tty' is not the same as a serial port. They are completely different. If you have set CYGWIN=tty then your stdin and stdout are actually Windows pipes. If you set CYGWIN=notty then your stdin/stdout is a Windows console. A serial line is associated with a com[12] device. So, there are three completely different things involved. Despite all this, I don't understand what you are referring to regarding the "extra required". There shouldn't be any difference between a Cygwin tty and the console as far as select is concerned. Could you provide more detail, please? What version of cygwin are you running and where are you running it? cygcheck output would show this. And, if you have a simple test case which illustrates this problem, that would also be helpful. -Christopher Faylor -Cygnus Solutions -Win32 Manager -- cgf AT cygnus DOT com http://www.cygnus.com/