consume fread() input buffer without syscall to read()

Karl Hiramoto karl at hiramoto.org
Tue Nov 10 15:49:54 UTC 2009


Hi,

Is there any way to consume what is in the stdio input buffer, without 
calling read()?

One option i have is modify   see libc/stdio/fread.c and create a new 
function that does not call __stdio_READ()


What I eventually want to do in my program, is call pipe() and splice() 
on the underlying file descriptors.   I can fflush() the ouput buffers  
but as far as I know there is not a way to clean out the input buffers 
without possibly calling a  new syscall to read()


Thanks.
--
Karl



More information about the uClibc mailing list