[GNC] Locked out of gnucash

John Ralls jralls at ceridwen.us
Mon Nov 25 23:53:42 EST 2019



> On Nov 25, 2019, at 9:44 AM, Derek Atkins <derek at ihtfp.com> wrote:
> 
> Adrien Monteleone <adrien.monteleone at lusfiber.net> writes:
> 
>>> Again, if user A has a data file open, user B shouldn't also open
>>> the file. I don't see how a check for Gnucash instances could work
>>> to prevent precisely this problem, since my machine won't have any
>>> Gnucash instances running--but the file IS being used.
>> 
>> I agree, using the PID won’t work, because although GnuCash is not
>> (yet) a multi-user app, some people do use it from various machines
>> with the file stored on a network. A PID check won’t mean anything to
>> one machine when that PID belongs to a different machine.
> 
> Using a "machine-name + PID" will absolutely work, because:
> 1) If the machine-name is the local machine, you can check the PID and
>   if the PID is not gnucash, you know it was an unclean exist.
> 
> 2) If the machine-name is the local machine, you can check the PID and
>   if the PID IS gnucash, you know there is another running instance.
> 
> 3) If the machine-name is NOT the local machine, then you cannot
>   differentiate what's going on and should ask.  Most likely it IS open,
>   but there's no good way to tell.
> 
> The good news is that #1 and #2 ARE the most common use-cases today, so
> we should implement that.


Oh, goody! ;-)

"Patches Welcome!"

Regards,
John Ralls



More information about the gnucash-user mailing list