develooper Front page | perl.perl5.porters | Postings from January 2003

Re: [perl #20525] Perl's stdio layer doesn't handle EINTR

Thread Previous | Thread Next
January 28, 2003 19:26
Re: [perl #20525] Perl's stdio layer doesn't handle EINTR
Message ID:
In article <>,
	Nick Ing-Simmons <> writes:
> Michael Schroeder <> writes:
>>But the current problem is
>>1) probably causing many people headaches, as it is easily to
>>   trigger.
>>2) easy to fix. Just retry the stdio call if fgets() returns EOF /
>>   fread() returns zero and errno is EINTR. You should probably
>>   clear errno before the call "just in case".
> Agreed in principle - do you have a verified patch for perlio.c to hand?

Sounds dangerous. errno has no particular guaranteed values after
stdio function failures. e.g. I can imagine it dropping semaphores in
threaded libc's that can sometimes change errno.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About