rc

[fork] interactive rc shell
Log | Files | Refs | README | LICENSE

commit b45bc7e88f3468121d8be516dc861e6fe45ab720
parent ed7d22829d82dba9714c6b7a5fdf37a95c05a269
Author: tgoodwin <tgoodwin>
Date:   Wed, 21 Oct 1998 12:52:57 +0000

don't include <setjmp.h> here
handle non-blocking stdin, etc.

Diffstat:
Minput.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/input.c b/input.c @@ -1,7 +1,6 @@ /* input.c: i/o routines for files and pseudo-files (strings) */ #include <errno.h> -#include <setjmp.h> #include "rc.h" #include "jbwrap.h" @@ -122,6 +121,10 @@ system, you lose. */ do { r = rc_read(istack->fd, inbuf + 2, BUFSIZE); sigchk(); + if (errno == EAGAIN) { + makenonblock(istack->fd); + errno = EINTR; + } } while (r < 0 && errno == EINTR); if (r < 0) { uerror("read");