This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
amigaos4: flock unimplemented
authorAndy Broad <andy@broad.ology.org.uk>
Thu, 20 Aug 2015 21:56:05 +0000 (17:56 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 5 Sep 2015 15:12:43 +0000 (11:12 -0400)
The semantics of locking are very different: first you lock,
then you open.  (And for semaphore-like uses of files, you
use ... semaphores.)

make_ext.pl

index 1b055c3..20c3bb0 100644 (file)
@@ -742,7 +742,9 @@ sub fallback_cleanup {
     open my $fh, '>>', $file or die "open $file: $!";
     # Quite possible that we're being run in parallel here.
     # Can't use Fcntl this early to get the LOCK_EX
-    flock $fh, 2 or warn "flock $file: $!";
+    if ($^O ne "amigaos") {
+        flock $fh, 2 or warn "flock $file: $!";
+    }
     print $fh $contents or die "print $file: $!";
     close $fh or die "close $file: $!";
 }