filter-stdin.diff   [plain text]


--- ../flex-2.5.35/filter.c	2007-03-07 13:50:24.000000000 -0800
+++ ./filter.c	2008-02-26 16:13:21.000000000 -0800
@@ -161,6 +161,7 @@ bool filter_apply_chain (struct filter *
          * 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]);