Jean-Marc Lasgouttes wrote:
>> That was my first idea. But we no more have filename in our hands so most 
>> we can output
>> is something like "can't unlock file". You prefer this?
>
> Well, at least we will know that this triggers and maybe take a look at it. 

Like attached. Vincent you want this in master?

> Is it a problem when locking does not succeed?

This is unlock part of the code.
Pavel
diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp
index 0012481..92aeaf7 100644
--- a/src/support/filetools.cpp
+++ b/src/support/filetools.cpp
@@ -1080,8 +1080,9 @@ int fileLock(const char * lock_file)
 void fileUnlock(int fd, const char * /* lock_file*/)
 {
 #if defined(HAVE_LOCKF)
-       if ( fd >= 0) {
-               (void) lockf(fd, F_ULOCK, 0);
+       if (fd >= 0) {
+               if (lockf(fd, F_ULOCK, 0))
+                       LYXERR0("Can't unlock the file.");
                close(fd);
        }
 #endif

Reply via email to