* UCW Library -- Careful Read/Write
*
* (c) 2004--2012 Martin Mares <mj@ucw.cz>
+ * (c) 2020 Jan Filip Chadima <jfch@jagda.eu>
*
* This software may be freely distributed and used according to the terms
* of the GNU Lesser General Public License.
{
ssize_t l = read(fd, pos, len);
if (l < 0)
- return -1;
+ {
+ if (errno == EINTR)
+ continue;
+ return -1;
+ }
if (!l)
return 0;
pos += l;
{
ssize_t l = write(fd, pos, len);
if (l < 0)
- return -1;
+ {
+ if (errno == EINTR)
+ continue;
+ return -1;
+ }
if (!l)
return 0;
pos += l;