]> granicus.if.org Git - flex/commitdiff
call clearerr on stdin before dup2'ing it; resolves bug #1902612
authorWill Estes <wlestes@users.sourceforge.net>
Wed, 14 May 2008 23:17:20 +0000 (23:17 +0000)
committerWill Estes <wlestes@users.sourceforge.net>
Wed, 14 May 2008 23:17:20 +0000 (23:17 +0000)
filter.c

index b0c7bf1edb09718763d6d4a0a259b2872205d35d..dad73967bb5fb7a54cfd9102878361eaaefc6140 100644 (file)
--- 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]);