This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Can outsiders get simple questions answered?


In article <36811E54.995A0AF8.cygnus.gnu-win32@sdrc.com>,
Dan Hensley <dan.hensley@sdrc.com> 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 <CR> 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 <CR> 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@cygnus.com
http://www.cygnus.com/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]