summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2003-05-18 18:19:42 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2003-05-18 18:19:42 +0000
commit42a7a32faa5272696f9e7f961a7335824698429d (patch)
treea62b3ee0989e907d053c1cb78ead36d48f95da7b /perlio.c
parentba85f2eaa56f5ba4c56314d0bcbc2c8a81e0813d (diff)
downloadperl-42a7a32faa5272696f9e7f961a7335824698429d.tar.gz
EINTR retry should exit on count >= 0 not !=0
p4raw-id: //depot/perlio@19557
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/perlio.c b/perlio.c
index 13b553e681..765882eff6 100644
--- a/perlio.c
+++ b/perlio.c
@@ -2980,10 +2980,10 @@ PerlIOStdio_read(pTHX_ PerlIO *f, void *vbuf, Size_t count)
}
else
got = PerlSIO_fread(vbuf, 1, count, s);
- if (got || errno != EINTR)
+ if (got >= 0 || errno != EINTR)
break;
PERL_ASYNC_CHECK();
- errno = 0; /* just in case */
+ SETERRNO(0,0); /* just in case */
}
return got;
}
@@ -3053,10 +3053,10 @@ PerlIOStdio_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
for (;;) {
got = PerlSIO_fwrite(vbuf, 1, count,
PerlIOSelf(f, PerlIOStdio)->stdio);
- if (got || errno != EINTR)
+ if (got >= 0 || errno != EINTR)
break;
PERL_ASYNC_CHECK();
- errno = 0; /* just in case */
+ SETERRNO(0,0); /* just in case */
}
return got;
}