diff options
author | Michael van Elst <mlelstv@NetBSD.org> | 2016-01-08 15:07:57 -0500 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2016-01-08 15:07:57 -0500 |
commit | 958ccda44e46a07053a2af0709c7149de0d7250a (patch) | |
tree | 1f882434298b38ff9836fa49498348e5e09bd07f /src/filter.c | |
parent | 3efb40df0ec5cddf0cb63a7900eb88258c478514 (diff) |
Improved pipe-stdin hack behavior; resolves sf#198.
Signed-off-by: Thomas <Klausner wiz@NetBSD.org>
Diffstat (limited to 'src/filter.c')
-rw-r--r-- | src/filter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/filter.c b/src/filter.c index aebc2fc..c58406d 100644 --- a/src/filter.c +++ b/src/filter.c @@ -167,6 +167,8 @@ clearerr(stdin); flexfatal (_("dup2(pipes[0],0)")); close (pipes[0]); fseek (stdin, 0, SEEK_CUR); + ungetc(' ', stdin); /* still an evil hack, but one that works better */ + (void)fgetc(stdin); /* on NetBSD than the fseek attempt does */ /* run as a filter, either internally or by exec */ if (chain->filter_func) { |