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
From:
perl5-porters
Date:
January 28, 2003 19:26
Subject:
Re: [perl #20525] Perl's stdio layer doesn't handle EINTR
Message ID:
b17hl6$6e9$1@post.home.lunix
In article <20030128130721.2002.3@bactrian.elixent.com>,
	Nick Ing-Simmons <nick.ing-simmons@elixent.com> writes:
> Michael Schroeder <mls@suse.de> 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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About