Patch for Exim 1.59 to deliver via NFS under Linux

Top Page
Delete this message
Reply to this message
Author: Christoph Lameter
Date:  
To: exim-users
Old-Topics: strace of locking attempt via NFS
Subject: Patch for Exim 1.59 to deliver via NFS under Linux
The following patch finally did the trick for me. I dont think this is
clean. Linux seems to cache the inode information locally and so the field

statbuf.st_nlink

never reaches the value 2 which is required for the successful completion
of the lock.

--- exim-1.59.orig/src/transports/appendfile.c
+++ exim-1.59/src/transports/appendfile.c
@@ -916,8 +916,10 @@
         fstat(hd, &statbuf);
         close(hd);
         unlink(hitchname);
+/*  The following code does not work under Linux statbuf.st_nlink is always 1 !
         if (statbuf.st_nlink != 2)
           {
+            DEBUG(2) debug_printf("statbuf.st_nlink = %d\n",statbuf.st_nlink);
           if (ob->lockfile_timeout > 0 && stat(lockname, &statbuf) == 0
&&
               now - statbuf.st_ctime > ob->lockfile_timeout)
             {
@@ -925,7 +927,7 @@
             unlink(lockname);
             }
           continue;
-          }
+          } */
         }
       }




--- +++ --- +++ --- +++ --- +++ --- +++ --- +++ --- +++ ---
PGP Public Key = FB 9B 31 21 04 1E 3A 33 C7 62 2F C0 CD 81 CA B5