X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Flibpspp%2Fu8-istream.c;h=b172b164f5c382c6055c205f0ea4f8e7ccc0f1c8;hb=8c55ecac749f80d53a7ff807eee563a4a48b72dc;hp=77c14133eabb271da894859345ae73e85a9a65b0;hpb=d6c75296e5573a997c79a7af1195b6a619c0190c;p=pspp diff --git a/src/libpspp/u8-istream.c b/src/libpspp/u8-istream.c index 77c14133ea..b172b164f5 100644 --- a/src/libpspp/u8-istream.c +++ b/src/libpspp/u8-istream.c @@ -194,8 +194,12 @@ fill_buffer (struct u8_istream *is) is->head = is->buffer; /* Read more input. */ - n = read (is->fd, is->buffer + is->length, - U8_ISTREAM_BUFFER_SIZE - is->length); + do + { + n = read (is->fd, is->buffer + is->length, + U8_ISTREAM_BUFFER_SIZE - is->length); + } + while (n < 0 && errno == EINTR); if (n > 0) is->length += n; return n;