Why doesn't _IO_do_write in fileops.c check for EINTR?
George T. Talbot
george@moberg.com
Thu Apr 20 09:16:00 GMT 2000
Ulrich Drepper wrote:
>
> "George T. Talbot" <george@moberg.com> writes:
>
> > Might a better sequence in (for example) _IO_do_write() look like this:
> >
> > do {
> > count = _IO_SYSWRITE (fp, data, to_do);
> > } while ((count == (_IO_size_t) -1) && (errno == EINTR));
>
> No. The write functions must be able to time out. Setting alarm()
> and try writing, returning after a while because the device does not
> respond. Leave libio as it is.
OK...my next question is, does basic_fstream<> do what you're saying here, or
will it get confused when _IO_SYSWRITE() fails do to EINTR?
--
George T. Talbot
<george at moberg dot com>
More information about the Libstdc++
mailing list