diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-03-09 20:30:06 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-03-09 20:30:06 -0800 |
commit | 0ceb62ad1eddfdc0ade20005829c845afec67d81 (patch) | |
tree | 268f8b7e90dc4afa4bae6474e4df8446a29fd8d0 /match.h | |
parent | 4d0cdf070aa173c6e4ca23ff05e00a5f1731efa5 (diff) | |
download | txr-0ceb62ad1eddfdc0ade20005829c845afec67d81.tar.gz txr-0ceb62ad1eddfdc0ade20005829c845afec67d81.tar.bz2 txr-0ceb62ad1eddfdc0ade20005829c845afec67d81.zip |
Don't open streams or stdin on non-matching directives.
* match.c (open_data_source): The logic of not opening
the data source for a non-matching directive must be applied
to streams also, because the lazy list mechanism will read
ahead from an underlying non-interactive stream. We must
also apply it in the case when we open standard input by
default. If standard input is non-interactive such that the
lazy list unconditionally tries to read a line from it
upon construction, we misbehave. The program could block
on the read. Even if it doesn't block, the input action is
an unwanted externally visible event.
Diffstat (limited to 'match.h')
0 files changed, 0 insertions, 0 deletions