summaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authortjg <tjg>1999-10-13 15:36:23 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:23:16 +0100
commit55187d8e921d611b3fa9ff4a166125c44b7dd6d9 (patch)
treeb9efe31261e5905e541478148c862c1377ef0e18 /input.c
parent40b965f8ff43131e22b0eb9cdafd2754166b0b76 (diff)
1999-10-13
Bug: a read(2) error in fdgchar() should call rc_raise(), not rc_exit(). This bug is easily tickled on systems (like Linux) which allow you to open(2) but not read(2) directories: `. /tmp'. In all previous versions of rc, this caused the shell to exit.
Diffstat (limited to 'input.c')
-rw-r--r--input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/input.c b/input.c
index 83bd60b..8daa6e2 100644
--- a/input.c
+++ b/input.c
@@ -125,7 +125,7 @@ static int fdgchar() {
} while (r < 0 && errno == EINTR);
if (r < 0) {
uerror("read");
- rc_exit(1);
+ rc_raise(eError);
}
chars_in = (size_t) r;
}