diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2003-05-18 18:19:42 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2003-05-18 18:19:42 +0000 |
commit | 42a7a32faa5272696f9e7f961a7335824698429d (patch) | |
tree | a62b3ee0989e907d053c1cb78ead36d48f95da7b /perlio.c | |
parent | ba85f2eaa56f5ba4c56314d0bcbc2c8a81e0813d (diff) | |
download | perl-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; } |