On Thu, Nov 7, 2019 at 10:43 AM Tom Lane <t...@sss.pgh.pa.us> wrote:
> =?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= 
> <juanjo.santama...@gmail.com> writes:
> > Please find attached a patch that adds the FILE_SHARE options to
> > TestLib::slurp_file using Win32API::File.
>
> Ick.  Are we going to need Windows-droppings like this all over the
> TAP tests?  I'm not sure I believe that slurp_file is the only place
> with a problem.

Not a Windows or Perl person, but I see that you can redefine core
functions with *CORE::GLOBAL::open = <replacement/wrapper>, if you
wanted to make a version of open() that does that FILE_SHARE_READ
dance.  Alternatively we could of course have our own xxx_open()
function and use that everywhere, but that might be more distracting.

I'm a bit surprised that there doesn't seem to be a global switch
thing you can set somewhere to make it do that anyway.  Doesn't
everyone eventually figure out that all files really want to be
shared?


Reply via email to