diff options
author | Bo Lindbergh <blgl@hagernas.com> | 2007-01-20 03:39:57 +0100 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2007-01-20 03:40:23 +0000 |
commit | f3be372353a263b94b1bb39fd4c8da0548050a63 (patch) | |
tree | fac66820299cded1d956f3cdc6e4452e425963b7 /perlio.c | |
parent | c3f5e0b6decb7359e3cd9e1f8f8ed57b00f14936 (diff) | |
download | perl-f3be372353a263b94b1bb39fd4c8da0548050a63.tar.gz |
Re: Race condition in IPC::Open3 / Mac OS?
Message-Id: <D256CF03-D814-4973-9DF6-60EA4F26FE10@hagernas.com>
p4raw-id: //depot/perl@29894
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -3419,9 +3419,15 @@ PerlIOStdio_fill(pTHX_ PerlIO *f) if (PerlSIO_fflush(stdio) != 0) return EOF; } - c = PerlSIO_fgetc(stdio); - if (c == EOF) - return EOF; + for (;;) { + c = PerlSIO_fgetc(stdio); + if (c != EOF) + break; + if (! PerlSIO_ferror(stdio) || errno != EINTR) + return EOF; + PERL_ASYNC_CHECK(); + SETERRNO(0,0); + } #if (defined(STDIO_PTR_LVALUE) && (defined(STDIO_CNT_LVALUE) || defined(STDIO_PTR_LVAL_SETS_CNT))) |