summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlestes <wlestes>2008-05-14 23:17:20 +0000
committerwlestes <wlestes>2008-05-14 23:17:20 +0000
commitef1987a79914b25a9baf97781d53f8c07bfca452 (patch)
treeefcaa6dbf2cab1482864af4851c207bfb0effc4d
parent09539dd4f8bf44f32341e61983dd311155433250 (diff)
downloadflex-ef1987a79914b25a9baf97781d53f8c07bfca452.tar.gz
call clearerr on stdin before dup2'ing it; resolves bug #1902612
-rw-r--r--filter.c1
1 files changed, 1 insertions, 0 deletions
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]);