From: Will Estes Date: Wed, 14 May 2008 23:17:20 +0000 (+0000) Subject: call clearerr on stdin before dup2'ing it; resolves bug #1902612 X-Git-Tag: flex-2-5-36~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b0a5e06b0a8ea39d7dae1fb19a42d8dae93f9140;p=flex call clearerr on stdin before dup2'ing it; resolves bug #1902612 --- diff --git a/filter.c b/filter.c index b0c7bf1..dad7396 100644 --- a/filter.c +++ b/filter.c @@ -161,6 +161,7 @@ bool filter_apply_chain (struct filter * chain) * to sync the stream. This is a Hail Mary situation. It seems to work. */ close (pipes[1]); +clearerr(stdin); if (dup2 (pipes[0], fileno (stdin)) == -1) flexfatal (_("dup2(pipes[0],0)")); close (pipes[0]);