Re: how to flush stdin buffer in linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 8, 2013 at 6:20 PM, Niroj Pokhrel <nirojpokhrel@xxxxxxxxx> wrote:
> 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.

fflush(stdin) is undefined.

-- 
Thanks,
//richard

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux