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

Re: [perl #18346] Signal handler broken using ithreads

Thread Previous | Thread Next
Nick Ing-Simmons
February 3, 2003 01:22
Re: [perl #18346] Signal handler broken using ithreads
Message ID:
Dan Sully <> writes:
>* Nick Ing-Simmons <> shaped the electrons to say...
>> Hmm, your report did not show evidence of that, you had -Duseperlio in the
>> perl -V output but linux normally defaults to :stdio layer.
>> When I ran the script in the report under perl5.8.0 on SuSE8.0 linux I got
>> behaviour you described. Running again with
>> PERLIO=perlio perl your-script
>> seemed to fix it i.e. after 'fg' it went back to reading tty.
>> I get same 'fixed' behaviour with default :stdio on my development branch
>> (//depot/perlio/... ) which was sync'ed with bleadperl this morning.
>> Can you try the PERLIO=perlio thing above and send me a copy/paste of what
>> happens if it does not work?
>That does work.


>If if define useperlio at compile time, why do Linux and Solaris default to
>using stdio at runtime?

-Duseperlio might have been spelt -DusePerlIO - it enables layer implementation,
where PerlIO * is one of my structs, as opposed to being #defined to stdio's
FILE *. Having layers is sufficent for Unicode and encoding hooks.

Then there is a separate run-time decision as to which "layer" to use 
as the implementation of buffered streams. The choice here is to use 
a :stdio layer (wrapper on stdio) if Configure has managed to figure 
out enough about FILE * to allow perl-ish tricks to work.
:perlio is used if Configure has not understood FILE *, and :crlf is used
if platform needs CRLF/"\n" translation.

The default of :stdio was for two reasons:
  A. :perlio is my re-write and so I thought it might have more bugs.
     While :stdio is just a wrapper on what perl5.003_02..perl5.6 have done
     so _should_ have been "safe". 
  B. :stdio allows XS code access to FILE * more easily.

>That seems like broken behavior.

In hindsight I agree - it has turned out that there are more bugs and snags 
in :stdio wrapper than in the :perlio re-write. The default may be changed 
in 5.8.1

Nick Ing-Simmons

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