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

Re: bleadperl: PerlIOStdio_invalidate_fileno breaks fclose semantics

Thread Previous
From:
Nick Ing-Simmons
Date:
February 1, 2003 02:25
Subject:
Re: bleadperl: PerlIOStdio_invalidate_fileno breaks fclose semantics
Message ID:
20030201102511.1872.3@bactrian.ni-s.u-net.com
Michael Schroeder <Michael.Schroeder@informatik.uni-erlangen.de> writes:
>Hi porters,
>
>the fix of the socket memory hole doesn't take into account that
>fclose() flushes the stdio stream. This flushing doesn't work anymore
>if fileno gets invalidated. As a result most web services will cease
>to work.

Hmm, there used to be code to fflush() in there - will take another 
look.

>
>Test program:
>
>open(T, ">/tmp/test") || die;
>open(D, ">&=".fileno(T)) || die;
>print D 'ok';
>close D || die;
>close T || die;
>open(T, "</tmp/test") || die;
>my $r = <T>;
>close T;
>$r ||= 'fail';
>print "$r\n";
>
>Cheers,
>  Michael.
-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/


Thread Previous


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