Re: string substitution problem

From: Gunnar Hjalmarsson (noreply_at_gunnar.cc)
Date: 10/15/03


Date: Wed, 15 Oct 2003 22:11:20 +0200

Purl Gurl wrote:
> Gunnar Hjalmarsson wrote:
>> Tassilo v. Parseval wrote:
>>> Win32 ... doesn't allow altering an already open file (unless
>>> of course you open it solely for changing the file).
>>
>> Does that mean that if a Perl program, that makes use of flock()
>> on *nix platforms, is run on a Windows platform with flock()
>> disabled, you still don't need to worry too much about files
>> being corrupted because of concurrent changes?
>
> No. Concurrent writes under Win32 are a problem which must be
> addressed via semaphore locking or one of my locking mechanisms
> presented at my website.

Okay, that's what I thought. Suppose my conclusion out from Tassilo's
statement was far too extensive. :)

Btw, flock() works on some Win32 systems. As far as I have understood,
the need for using some other locking method is limited to Windows 95
and 98.

<snip>

> Perl does not honor "permission denied" under Win32. Locking
> mechanisms are critical to prevent concurrent writes under Win32
> when using Perl.

Thanks for clarifying.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


Relevant Pages