[uClibc] question about unbuffed get_char()

Christopher Hoover ch at murgatroid.com
Mon Dec 1 23:37:29 UTC 2003


> Anyone can tell me what is wrong or is there another way to make
get_char() return immediately?

The tty driver is in cooked mode by default. 

If you want to read a character at a time, you must turn off cooked mode
(i.e. turn on raw mode):

You may use the cfmakeraw function to do that.  See termios(3) for details.

-ch




More information about the uClibc mailing list