From 55187d8e921d611b3fa9ff4a166125c44b7dd6d9 Mon Sep 17 00:00:00 2001 From: tjg Date: Wed, 13 Oct 1999 15:36:23 +0000 Subject: 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. --- ChangeLog | 7 +++++++ input.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e12fb41..a818806 100644 --- a/ChangeLog +++ b/ChangeLog @@ -617,3 +617,10 @@ Changes since rc-1.5b2 Portability: status.c assumes traditional Unix layout of 0 and 1 exit statuses in the parent, which is not shared by BeOS. Add mkstatval.c. + +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. 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; } -- cgit v1.2.3