Branch: Tag:

2015-05-04

2015-05-04 13:44:35 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Stdio.sendfile: Ensure that the initial seek doesn't fail.

Fixes [CID 742461].

672:   #endif    SF_DFPRINTF((stderr, "sendfile: Using read() and write().\n"));    -  fd_lseek(this->from_fd, this->offset, SEEK_SET); +  while ((fd_lseek(this->from_fd, this->offset, SEEK_SET) < 0) && +  (errno == EINTR)) +  ; +     {    ptrdiff_t buflen;    ptrdiff_t len;