unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jan Synacek <jsynacek@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 24656@debbugs.gnu.org
Subject: bug#24656: 25.1; Emacs leaves lock files on a CIFS share
Date: Tue, 11 Oct 2016 08:32:35 +0200	[thread overview]
Message-ID: <CAPsXM8XC5fR7KvBY=riivcpKE_-kX0fOVN1JjtTm8wrz4SLrjA@mail.gmail.com> (raw)
In-Reply-To: <838ttwdx0n.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 693 bytes --]

On Mon, Oct 10, 2016 at 5:49 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Jan Synacek <jsynacek@redhat.com>
>> Date: Mon, 10 Oct 2016 15:49:11 +0200
>> Cc: 24656@debbugs.gnu.org
>>
>> The lock_file_1 correctly uses a path with a colon in it. Indeed,
>> samba seems to substitute it. I tried to patch the emacs source to use
>> a comma instead. It didn't get substituted by samba, but the lock file
>> didn't go away when I exited emacs.
>
> Did you also patch current_lock_owner to account for the change from a
> colon to a comma?

Aha! After patching current_lock_owner, the lock file is correctly
removed. I'm attaching the patch.

Thank you!
-- 
Jan Synacek
Software Engineer, Red Hat

[-- Attachment #2: emacs.patch --]
[-- Type: text/x-patch, Size: 739 bytes --]

diff --git a/src/filelock.c b/src/filelock.c
index a2e1df9..bcc2e03 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -450,7 +450,7 @@ lock_file_1 (char *lfname, bool force)
     {
       if (sizeof lock_info_str
           <= snprintf (lock_info_str, sizeof lock_info_str,
-                       "%s@%s.%"pMd":%"pMd,
+                       "%s@%s.%"pMd",%"pMd,
                        user_name, host_name, pid, boot))
         return ENAMETOOLONG;
     }
@@ -564,7 +564,7 @@ current_lock_owner (lock_info_type *owner, char *lfname)
       lfinfo_end = owner->colon;
       break;
 
-    case ':':
+    case ',':
       if (! c_isdigit (owner->colon[1]))
 	return -1;
       boot_time = strtoimax (owner->colon + 1, &lfinfo_end, 10);

  reply	other threads:[~2016-10-11  6:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10 11:30 bug#24656: 25.1; Emacs leaves lock files on a CIFS share Jan Synáček
2016-10-10 12:14 ` Eli Zaretskii
2016-10-10 13:49   ` Jan Synacek
2016-10-10 15:49     ` Eli Zaretskii
2016-10-11  6:32       ` Jan Synacek [this message]
2016-10-11  6:49         ` Eli Zaretskii
2016-10-11  6:52           ` Jan Synacek
2016-10-11 15:59           ` Paul Eggert
2016-10-11 16:29             ` Eli Zaretskii
2016-10-11 16:53               ` Paul Eggert
2016-10-11 17:07                 ` Eli Zaretskii
2016-10-11 20:15                   ` Paul Eggert
2016-10-11 20:58                     ` Eli Zaretskii
2016-10-11 22:46                       ` Paul Eggert
2016-10-12  6:40                         ` Eli Zaretskii
2016-10-12 16:21                           ` Paul Eggert
2016-10-12 16:53                             ` Eli Zaretskii
2016-10-11 17:43             ` Achim Gratz
2016-10-11 18:16               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPsXM8XC5fR7KvBY=riivcpKE_-kX0fOVN1JjtTm8wrz4SLrjA@mail.gmail.com' \
    --to=jsynacek@redhat.com \
    --cc=24656@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).