stdin buffering woes
I am writing a simple IRC client, and I want to read from stdin. Currently I am selecting on file descriptor 0 thusly:
Code:
while(1) { I have tried: Code:
setvbuf(stdin, NULL, _IONBF, 0); I want to read a character as soon as it is pressed. Any ideas? Thanks |
Common question. You need to switch the stdin file descriptor to raw mode.
http://www.linuxquestions.org/questi...07#post2570807 |
Thanks, apologies for asking a question that had been answered - I didn't search well enough.
Works a charm :) |
All times are GMT -5. The time now is 05:43 PM. |