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

Re: Trouble with PERLIO_INIT/PERLIO_TERM changes

Thread Previous | Thread Next
From:
Steve Hay
Date:
November 30, 2006 00:46
Subject:
Re: Trouble with PERLIO_INIT/PERLIO_TERM changes
Message ID:
456E99E5.2000602@uk.radan.com
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 test.pl:

http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-11/msg01064.html


> 
> 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:

test.pl:0 refcnt_inc: fd 4 refcnt=1
test.pl:10 refcnt_dec: fd 4 refcnt=0

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

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


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