* exceptions.cc (call_signal_handler_now): Add additional guard against

inappropriately calling signal handler.
* syscalls.cc (_read): Reset errno if not exiting due to signal.
This commit is contained in:
Christopher Faylor
2001-09-12 05:09:24 +00:00
parent ff6e295ebf
commit aed6988a36
3 changed files with 14 additions and 0 deletions

View File

@@ -275,6 +275,7 @@ _read (int fd, void *ptr, size_t len)
int res;
fhandler_base *fh;
extern int sigcatchers;
int e = get_errno ();
while (1)
{
@@ -318,6 +319,7 @@ _read (int fd, void *ptr, size_t len)
out:
if (res >= 0 || get_errno () != EINTR || !thisframe.call_signal_handler ())
break;
set_errno (e);
}
syscall_printf ("%d = read (%d<%s>, %p, %d), bin %d, errno %d", res, fd, fh->get_name (),