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

Re: [perl #111352] bad file descriptor after failed read

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
February 26, 2012 13:44
Subject:
Re: [perl #111352] bad file descriptor after failed read
Message ID:
CAHhgV8gni=qWgN5Keu-v-j2iO_ckkXmvDhUW07dJk6Ft-sH8hg@mail.gmail.com
On Sun, Feb 26, 2012 at 7:53 AM, ian.goodacre@xtra.co.nz <
perlbug-followup@perl.org> wrote:

> I was surprised to find that after a failed read on a file descriptor
> opened for write, many (but not all) operations on the file descriptor
> failed with "bad file descriptor'.
>
> What I expected was that the read would fail (because the file was
> opened for write only) but subsequent operations (e.g. close, print,
> seek, tell, etc.) would succeed.
>

I have recently discovered the same issue, while finding an explanation for
bug #108124.


> Checking with Process Monitor (I saw this behavior on Windows 7), I
> did not see any failed operations on the file at the Windows interface,
> so I am guessing the bad file descriptor is from perl.
>

That is correct too. I have a pretty good idea of how to fix, but I hadn't
gotten around to it yet. From what I understand it's too late to get into
5.16 though. I expect to have a fix ready for 5.17.0 though.

Leon


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