Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index



On Mon, 2011-11-14 at 15:23 +0200, Tor Lillqvist wrote:
In both cases, just knowing *who* is holding the document open would be enough.

        'Who' is of course something that we can get incredibly quickly from
the operating-system, and is already in the file.

        Of course, this doesn't deal with the hacker use-case of having dozens
of LibO open on lots of different systems, and forgetting where you left
them all but ... ;-) [ hopefully that is a minority use-case ].

        We already have the user name + account in the .~lock file I guess; but
we could prolly do quite a lot better here:

        * detecting whether the file is on a network file-system;
          if not - warning about other users using it is pretty
          lame ;-)
                + the downer being that reliably detecting file-system
                  type is quite 'fun' - but we do dozens of
                  lstat walks down the file-system already anyway so ...

        * storing the <pid> of the relevant process in the .lock
          file, such that if the system-names match we can verify if
          indeed the .lock file is just stale

        * removing .lock files when we select to open a copy, so they
          don't sit around indefinately causing grief when created.

        * silently deleting lock files if thy are > a week old (and
          file remains un-touched for that time)
                + where 'week' is customiseable by the paranoid

        Or is that highly controversial ? :-) if not, I'll create an 'easy'
hack or two I guess.

        ATB,

                Michael.

-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.