automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[automake-commit] branch master updated: port XFile locking to OpenIndia


From: Paul Eggert
Subject: [automake-commit] branch master updated: port XFile locking to OpenIndiana
Date: Sat, 01 Aug 2020 19:13:39 -0400

This is an automated email from the git hooks/post-receive script.

eggert pushed a commit to branch master
in repository automake.

View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=217d6d92df9ea44c225ea815e121eb5c539bb748

The following commit(s) were added to refs/heads/master by this push:
     new 217d6d9  port XFile locking to OpenIndiana
217d6d9 is described below

commit 217d6d92df9ea44c225ea815e121eb5c539bb748
Author: Paul Eggert <eggert@cs.ucla.edu>
AuthorDate: Sat Aug 1 16:12:34 2020 -0700

    port XFile locking to OpenIndiana
    
    I observed this problem on an NFS filesystem on an OpenIndiana
    host (5.11 illumos-dde7ba523f i386).  fcntl (fd, F_SETLK, ...)
    failed with errno == EINVAL, which POSIX allows for files that
    do not support locking.
    * lib/Automake/XFile.pm (lock): Treat EINVAL like ENOLCK.
---
 lib/Automake/XFile.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/Automake/XFile.pm b/lib/Automake/XFile.pm
index 239c9b7..7d54404 100644
--- a/lib/Automake/XFile.pm
+++ b/lib/Automake/XFile.pm
@@ -232,7 +232,8 @@ sub lock
 
   # Unless explicitly configured otherwise, Perl implements its 'flock' with 
the
   # first of flock(2), fcntl(2), or lockf(3) that works.  These can fail on
-  # NFS-backed files, with ENOLCK (GNU/Linux) or EOPNOTSUPP (FreeBSD); we
+  # NFS-backed files, with ENOLCK (GNU/Linux) or EOPNOTSUPP (FreeBSD) or
+  # EINVAL (OpenIndiana, as per POSIX 1003.1-2017 fcntl spec); we
   # usually ignore these errors.  If $ENV{MAKEFLAGS} suggests that a parallel
   # invocation of 'make' has invoked the tool we serve, report all locking
   # failures and abort.
@@ -251,7 +252,7 @@ sub lock
 
       msg ($make_j ? 'fatal' : 'unsupported',
           "cannot lock $file with mode $mode: $!" . ($make_j ? $note : ""))
-       if $make_j || !($!{ENOLCK} || $!{EOPNOTSUPP});
+       if $make_j || !($!{EINVAL} || $!{ENOLCK} || $!{EOPNOTSUPP});
     }
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]