Change 29894 by [EMAIL PROTECTED] on 2007/01/20 03:40:23
Subject: [PATCH] Re: Race condition in IPC::Open3 / Mac OS?
From: Bo Lindbergh <[EMAIL PROTECTED]>
Date: Sat, 20 Jan 2007 02:39:57 +0100
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/perlio.c#363 edit
Differences ...
==== //depot/perl/perlio.c#363 (text) ====
Index: perl/perlio.c
--- perl/perlio.c#362~29830~ 2007-01-15 06:38:58.000000000 -0800
+++ perl/perlio.c 2007-01-19 19:40:23.000000000 -0800
@@ -3419,9 +3419,15 @@
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)))
End of Patch.