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
Michael Schroeder
January 27, 2003 05:04
Re: [perl #20525] Perl's stdio layer doesn't handle EINTR
Message ID:
> This is a side effect of the "safe signals" support.
> I "had" to turn off SA_RESTART so that syscall would resturn and give us 
> a chance to execute the perl level %SIG handler.

Yes, actually I have complained about breaking compatibility a few
weeks ago (it was about an EINTR in an accept() call, yes, a bit of an
esoteric case). But the current problem is

1) probably causing many people headaches, as it is easily to

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".


Michael Schroeder                         

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