"read" bug in Cygwin 1.5.16?
Peter Farley
pjfarley3@yahoo.com
Sun May 1 23:56:00 GMT 2005
Hi all,
I tried to forward this message to the main cygwin
list yesterday, but had a little trouble getting it
there, probably because I mentioned "xterm" in the
subject. I'm trying again in case this is NOT an "X"
problem but a base cygwin problem.
I have attached the test program xtermbug.c instead
of pasting it inline. I hope that is OK for this
list.
If there is anything I can do to help debug the reason
I am seeing this problem, please just tell me what to
do.
BTW, thanks to all the developers for an awesome
product.
Regards,
Peter Farley
--- Peter Farley <pjfarley3@yahoo.com> wrote:
> Hi all,
>
> The following program demonstrates what looks to me
> like a bug in the "read" function in an xterm (as
> opposed to a Cygwin console window). To run the
> test, compile with:
>
> gcc -g -o xtermbug.exe xtermbug.c
>
> When you run it in a console window, you can enter
> normal keyboard characters, then a return to see
> "cmdline=<what you typed>". Press the Esc key to
> exit the program.
>
> When run in an xterm window, the first keypress
> causes this behavior:
>
> 1. Select returns with rc = 0 and readset set to
> indicate that a key was received
> 2. "read" returns with kblen = 1 and kbbuf[0] = '\0'
> 3. (1) and (2) repeat forever.
>
> I put in a "maxdbg" parameter and terminate the
> program after 5 occurrences of this loop.
>
> This problem was first detected trying to run a copy
> of the hercules IBM mainframe emulator in a Cygwin
> xterm window. The code below is extracted and
> minimalized as much as possible from the hercules
> keyboard input routine.
>
> Peter Farley
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xtermbug.c
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050501/164752b1/attachment.c>
-------------- next part --------------
--
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/
More information about the Cygwin
mailing list