develooper Front page | perl.perl5.porters | Postings from November 2006

Re: Trouble with PERLIO_INIT/PERLIO_TERM changes

Thread Previous | Thread Next
Steve Hay
November 30, 2006 00:46
Re: Trouble with PERLIO_INIT/PERLIO_TERM changes
Message ID:
Jarkko Hietaniemi wrote:
>> I think he means the one that is bundled with his test distro in his
>> earlier reply to me.
>> Which reads:
>> use strict;
>> use warnings;
>> use Foo;
>> local(*FH);
>> fopen(*FH, 'MANIFEST', 'r');
>> close(FH);
>> print "OK\n";
> Okay, thanks.  Can't quite test it since I don't have Foo.o (or Foo.xs)
> and therefore XSLoader is unhappy.

Why don't you have Foo.xs? It's in the test distro that I sent before, 
along with the

> Basically the thing with the PERLIO_DEBUG log is that open (and up)
> increment the refcnt, close decrements it.  If they don't match,
> something is internally wrong with perlio, or something bypassed
> perlio.

The debug.txt that I sent (did you get that alright?) makes only two 
mentions of fd 4: refcnt_inc: fd 4 refcnt=1 refcnt_dec: fd 4 refcnt=0

so nothing looks like it doesn't match, and yet it still croaks with the 

refcnt_dec: fd 4: 0 <= 0

I'm guessing that the file was opened (inc refcnt to 1), then closed 
(dec refcnt to 0) and then some attempt was made within PerlIO to close 
it again (triggering the croak)?


Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only. If you have received this message in error or there are any problems, please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden. Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd. The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.

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