From 8ff9477238020917610c48f790f522b48fe5a169 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 23 Feb 2002 12:35:19 +0000 Subject: IEEE Std 1003.1-2001 says that the "fclose() function shall fail [with] EINTR [when] the fclose() function was interrupted by a signal". But looking in the current uClibc stdio.c for some bizarre reason we had a special case where when errno was EINTR, we would keep on trying instead. Doh! Fix that, -Erik --- libc/stdio/stdio.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'libc/stdio') diff --git a/libc/stdio/stdio.c b/libc/stdio/stdio.c index eb2961f37..3f475aec0 100644 --- a/libc/stdio/stdio.c +++ b/libc/stdio/stdio.c @@ -439,12 +439,8 @@ off_t _uClibc_fread(unsigned char *buf, off_t bytes, FILE *fp) goto FROM_BUF; } - TRY_READ: len = read(fp->fd, p, (unsigned) bytes); if (len < 0) { - if (errno == EINTR) { /* We were interrupted, so try again. */ - goto TRY_READ; - } fp->mode |= __MODE_ERR; } else { p += len; @@ -549,9 +545,7 @@ off_t _uClibc_fwrite(const unsigned char *buf, off_t bytes, FILE *fp) while (bytes) { if ((rv = write(fp->fd, p, bytes)) < 0) { rv = 0; - if (errno != EINTR) { - break; - } + break; } p += rv; bytes -= rv; -- cgit v1.2.3