This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: Why doesn't _IO_do_write in fileops.c check for EINTR?
- To: "George T. Talbot" <george at moberg dot com>
- Subject: Re: Why doesn't _IO_do_write in fileops.c check for EINTR?
- From: Ulrich Drepper <drepper at redhat dot com>
- Date: 20 Apr 2000 08:31:34 -0700
- Cc: libstdc++ List <libstdc++ at sourceware dot cygnus dot com>
- References: <38FF10F9.194566BC@moberg.com>
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
"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.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------