rhl@astro.Princeton.EDU (Robert Lupton (the Good)) (10/13/90)
I have some code that runs on lots of machines and reads keystrokes in CBREAK mode, using a BSD-style tty driver. Compiling with c89 -D_POSIX_SOURCE -Dunix I get a delay of 4 key-strokes between when I type a character and when my code sees and echoes it. Any ideas? Robert
kevin@msa3b.UUCP (Kevin P. Kleinfelter) (10/15/90)
rhl@astro.Princeton.EDU (Robert Lupton (the Good)) writes: >I have some code that runs on lots of machines and reads keystrokes >in CBREAK mode, using a BSD-style tty driver. Compiling with > c89 -D_POSIX_SOURCE -Dunix >I get a delay of 4 key-strokes between when I type a character and when >my code sees and echoes it. Is NCHARS=5? We found that changing the tty configuration via stty TCSETA, while characters were present in the buffer, caused the tty driver to insist on having all NCHARS chars in the input buffer, regardless of the setting of NDELAY. There is a fix (they created it for us). It is new, and involves replacing the driver. (Be sure they give you the fixed fix -- the first fix only changed the problem, and did not fix it!) -- Kevin Kleinfelter @ Dun and Bradstreet Software, Inc (404) 239-2347 {emory,gatech}!nanovx!msa3b!kevin "Don't hold your finger on the button if the motor ain't goin' roundy-roundy."