Loading ...
Sorry, an error occurred while loading the content.
 

Re: incorrect "still running" swap file message

Expand Messages
  • Bram Moolenaar
    ... Unfortunately Linux recycles process IDs. It does not happen very often that Vim makes a mistake with that. The way you discovered that the process is
    Message 1 of 7 , Sep 14, 2013
      Andrew McNabb wrote:

      > Vim (vim-enhanced-7.4.0-2.fc19.x86_64 on Fedora) is currently reporting
      > 'Found a swap file by the name ".linalg.py.swp"' along with
      > 'process ID: 4157 (still running)'.
      >
      > However, process 4157 is not a Vim process:
      >
      > $ readlink /proc/4157/exe
      > /usr/bin/pulseaudio (deleted)
      > $
      >
      > and '.linalg.py.swp' does not appear in /proc/4157/fd.
      >
      > Unfortunately, since Vim thinks that another process is using the swap
      > file, it does not give a '(D)elete' option to remove the outdated swap
      > file. It would be nice if either the heuristic for determining whether
      > another Vim process would use information in /proc.

      Unfortunately Linux recycles process IDs. It does not happen very often
      that Vim makes a mistake with that. The way you discovered that the
      process is not Vim is not a generic solution. On top of that, it could
      be Vim but another process than the one that created the swap file.

      Generally, I don't think it's worth solving. Better avoid that Vim dies
      and leave swap files behind.

      --
      hundred-and-one symptoms of being an internet addict:
      213. Your kids start referring to you as "that guy in front of the monitor."

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ an exciting new programming language -- http://www.Zimbu.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Andrew McNabb
      ... I don t hit it every day, but it s not uncommon after a reboot to hit this problem. Any OS (not just Linux) will reuse process IDs after rebooting, which
      Message 2 of 7 , Sep 14, 2013
        On Sat, Sep 14, 2013 at 11:01:45PM +0200, Bram Moolenaar wrote:
        >
        > Unfortunately Linux recycles process IDs. It does not happen very often
        > that Vim makes a mistake with that.

        I don't hit it every day, but it's not uncommon after a reboot to hit
        this problem. Any OS (not just Linux) will reuse process IDs after
        rebooting, which is a more common situation than wrapping of PIDs.

        > The way you discovered that the
        > process is not Vim is not a generic solution. On top of that, it could
        > be Vim but another process than the one that created the swap file.

        That's true--there's no cross-platform way to detect whether there is
        another Vim process running. It's particularly impossible on networked
        filesystems. Since the heuristic is often wrong, I would personally
        prefer that Vim not try to detect whether another Vim process is
        running.

        > Generally, I don't think it's worth solving. Better avoid that Vim dies
        > and leave swap files behind.

        I find the current behavior moderately annoying, but I won't press the
        issue. Thanks for your time and consideration.

        --
        Andrew McNabb
        http://www.mcnabbs.org/andrew/

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      Your message has been successfully submitted and would be delivered to recipients shortly.