how to flush stdin buffer in linux

Niroj Pokhrel nirojpokhrel at gmail.com
Tue Jan 8 12:20:16 EST 2013


Hi all,
I tried to use fflush(stdin) in gcc as I used to in other compilers. But It
didn't clear my buffer so I am wondering how can I clear the stdin buffer
in GCC.
I tried using lseek but got -EPIPE (as tty devices doesn't support lseek
operation).
Thanx in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130108/6ffc5ec5/attachment.html 


More information about the Kernelnewbies mailing list