tachyon has asked for the wisdom of the Perl Monks concerning the following question:

At this node mutual exclusion and file locking on windows some monks assert that flock works well on Windows. When I test using Win95 and AS Build 621:

C:\>type flock.pl use Fcntl qw(:DEFAULT); print "This is $^O\n"; open FILE, ">>test.txt" or die "Oops $!\n"; flock FILE, LOCK_EX or die "Can't flock $!\n"; close FILE; C:\>perl flock.pl This is MSWin32 flock() unimplemented on this platform at flock.pl line 6. C:\>

Can anyone direct me to a list of which versions of Windows flock works on and which versions it does not? Does anyone care? Sadly I must, ref My Life

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Flock 'n Windows
by mexnix (Pilgrim) on Aug 07, 2001 at 20:05 UTC
    ActiveState build 626, perlport:

    flock FILEHANDLE,OPERATION

    Not implemented (Mac OS, VMS, RISC OS, VOS).
    Available only on Windows NT (not on Windows 95). (Win32)

    __________________________________________________
    <moviequote name="Hackers">
    The Plague: [...]Well let me explain the New World Order. Governments and corporations need people like you and me. We are samurai. The keyboard cowboys. And all those other people out there who have no idea what's going on are the cattle. Mooo!
    </moviequote>

    mexnix.perlmonk.org

      Thanks, I looked in the Active State docks under 'Quirks' and flock is not mentioned in the list of unimplemented Perl functions. I only recently discoverd that fork() is now available so was hopeful that newer builds of AS Perl might include support for this. As is so often the case you just need to know where to look. Thanks very much for the link.

      cheers

      tachyon

      s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print