Questions Regarding Backup and Stopping Gnucash

Buddha Buck blaisepascal at gmail.com
Sun Sep 22 23:36:52 EDT 2013


The question is, once you have the pid of a running gnucash, what can you
sensibly do with it?

Right now, I'd say "nothing".  Sending a SIGTERM may cause gnucash to quit,
but probably leaving a lockfile and not saving any transactions since the
last autosave.  Sending SIGKILL will do likewise.

What could be a sensible enhancement is to put in some signal handlers:
 SIGHUP to force an autosave (useful for preparation for late-night
backups, the usecase that started this thread), SIGTERM to save-and-quit,
etc.

But arguably, GnuCash is not meant to be used that way, and the signal
handlers would support an unsupported usecase.  And may not be portable,
either.


On Sun, Sep 22, 2013 at 11:15 PM, John Griessen <john at cibolo.com> wrote:

> On 09/22/2013 09:23 PM, Mark Phillips wrote:
>
>> Any
>> suggestions on how to gracefully kill gnucash from the command line?
>>
> I'm guessing you mean as a result of giving a shutdown command. Good idea.
>  I know some
> of the debian distro has actions like that, but for services that are in
> /etc/init.d.  You could
> do a pipe:
> ps ax | grep gnucash
> as a command run from inside a perl or python script,
> then so some text processing on the result...
>
> john at toolbench:~$ ps ax | grep gnucash
>  5720 pts/1    Sl     0:20 gnucash xxxxxx.gnucash
>  5737 pts/0    S+     0:00 grep gnucash
>
> I just use the open anyway dialog box answer to deal with the lock files.
> Have not had trouble.
>
> Am I risking some trouble doing that?
>
> ______________________________**_________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/**mailman/listinfo/gnucash-user<https://lists.gnucash.org/mailman/listinfo/gnucash-user>
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


More information about the gnucash-user mailing list