Michael Schroeder <Michael.Schroeder@informatik.uni-erlangen.de> writes: >Hi Porters, > >a somewhat surprising change in perl-5.8 is that signal handlers >aren't installed with SA_RESTART any longer (contradicting >perlvar.pod). This is necessary for the synchronous signals stuff to work. If the syscall is restarted the defered signal handler never gets called. >This breaks some of our programs, which e.g. use: > > while ($client = $server->accept()) { > [...] > } > >accept() is no longer restarted so the loop will fail if a signal >occures. > >Another interesting point is that if one writes > > while ($client = $server->accept() || $!{EINTR}) { > next if $!{EINTR}; > [...] > } > >the signal handler mustn't do something that change $!, because >then $! will not be EINTR anymore. This is a very unintuitive >behaviour. > >So, what can be done? It would be nice if the syscalls that >where automatically restarted in old perl versions would be >handled like the ones in perlio. The correct fix in PerlIO world is probably to have pp_accept() test for EINTR, dispatch signals and re-start. > >What do you think? Can you create a testcase? > >Cheers, > Michael. -- Nick Ing-Simmons http://www.ni-s.u-net.com/Thread Previous | Thread Next