+2002-05-12 Christopher Faylor <cgf@redhat.com>
+
+ * syscalls.cc (_read): Change error to EBADF if attempt to write to a
+ non-writable fd.
+
2002-05-11 Christopher Faylor <cgf@redhat.com>
* fhandler.h (executable_states): For now, make dont_care_if_executable
}
out:
+
+ if (res && get_errno () == EACCES &&
+ !(cfd->get_flags () & (O_RDONLY | O_RDWR)))
+ {
+ set_errno (EBADF);
+ break;
+ }
+
if (res >= 0 || get_errno () != EINTR || !thisframe.call_signal_handler ())
break;
set_errno (e);