Re: [hackers] [sbase] [PATCH 2/3] find: Fix flushing input buffer with -ok

From: Roberto E. Vargas Caballero <>
Date: Tue, 16 Jun 2015 08:59:42 +0200

On Mon, Jun 15, 2015 at 03:27:37PM -0400, Wolfgang Corcoran-Mathe wrote:
> The original flush-stdin loop (with fgets()) hung until the user
> entered some extraneous characters for it to kill.

I don't know if it is related or not, but I'm having a similar problem
with glibc. See this code:

                return 0;

If the user writes a ctrl-d in the first getchar, then the second
getchar blocks until the user writes something else, although the
file already reached the end of file. I have tested it in NetBSD
to, and the second getchar returns automatically with EOF. I
don't know what is said in the C standard, but I think this is an
error in glibc.

Received on Tue Jun 16 2015 - 08:59:42 CEST

This archive was generated by hypermail 2.3.0 : Thu Jun 18 2015 - 17:37:27 CEST