On Thu, Nov 07, 2019 at 11:13:32AM +1300, Thomas Munro wrote: > 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.
FWIW, I would have gone with a solution like that, say within TestLib.pm's INIT. This ensures that any new future tests don't fall into that trap again. > Alternatively we could of course have our own xxx_open() function > and use that everywhere, but that might be more distracting. That does not sound really appealing. > 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? I guess it depends on your requirements. Looking around I can see some mention about flock() but it does not solve the problem at the time the fd is opened. If this does not exist, then it seems to me that we have very special requirements for our perl code, and that these are not popular. -- Michael
signature.asc
Description: PGP signature