<div dir="ltr">you may try with<div style>__fpurge()</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 9, 2013 at 1:23 AM, Tobias Boege <span dir="ltr">&lt;<a href="mailto:tobias@gambas-buch.de" target="_blank">tobias@gambas-buch.de</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, 08 Jan 2013, Niroj Pokhrel wrote:<br>
&gt; Hi all,<br>
&gt; I tried to use fflush(stdin) in gcc as I used to in other compilers. But It<br>
&gt; didn&#39;t clear my buffer so I am wondering how can I clear the stdin buffer<br>
&gt; in GCC.<br>
&gt; I tried using lseek but got -EPIPE (as tty devices doesn&#39;t support lseek<br>
&gt; operation).<br>
&gt; Thanx in advance.<br>
<br>
</div></div>If it&#39;s a tty, you may want to use tcflush(fd, TCIFLUSH);<br>
<br>
Regards,<br>
Tobi<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<div>saurabh</div><div><a href="http://about.me/shandilyasaurabh" target="_blank">http://about.me/shandilyasaurabh</a>
</div><div><a href="http://www.beyondszine.wordpress.com" target="_blank">www.beyondszine.wordpress.com</a></div>
</div>