Re: ssl tests fail on windows / slurp_file() offset doesn't work on win - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: ssl tests fail on windows / slurp_file() offset doesn't work on win
Date
Msg-id 0f3fcb9d-e6d2-16a2-6720-17e88adf0534@dunslane.net
Whole thread Raw
In response to Re: ssl tests fail on windows / slurp_file() offset doesn't work on win  (Andres Freund <andres@anarazel.de>)
Responses Re: ssl tests fail on windows / slurp_file() offset doesn't work on win  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 10/3/21 1:30 PM, Andres Freund wrote:
>
>> Why did 3c5b0685b921 choose to use setFilePointer() in the first place? At
>> this point it's a perl filehandle, so we should just use perl seek?
>>
>>
>> Leaving the concrete breakage aside, I'm somewhat unhappy that there's not a
>> single comment explaining why TestLib.pm is trying to use native windows
>> APIs.
>>
>> Isn't the code as-is also "leaking" an open IO::Handle? There's a
>> CloseHandle($fHandle), but nothing is done to $fh. But perhaps there's some
>> perl magic cleaning things up? Even if so, loks like just closing $fh will
>> close the handle as well...
> I think something roughly like the attached might be a good idea. Runs locally
> on linux, and hopefully still on windows
>
> https://cirrus-ci.com/build/4857291573821440
>

Looks sane, thanks.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com




pgsql-hackers by date:

Previous
From: Dagfinn Ilmari Mannsåker
Date:
Subject: Re: func.sgml
Next
From: Mark Dilger
Date:
Subject: Re: BUG #17212: pg_amcheck fails on checking temporary relations