Questions Regarding Backup and Stopping Gnucash

Mark Phillips mark at phillipsmarketing.biz
Mon Sep 23 00:41:05 EDT 2013


I guess my question really is, will killing gnucash this way (ie the normal
way to kill a program from the command line) create any issues with
restarting the program. Or, will gnucash close down gracefully when it
receives a kill command?

Thanks,

Mark


On Sun, Sep 22, 2013 at 9:34 PM, prl <prl at ozemail.com.au> wrote:

> killall gnucash
>
> Or, if you must do it the hard way:
>
> if ps ax | grep -q 'gnu\cash'; then kill `ps ax | awk '/gnu\cash/ {print
> $1}'`; fi
>
> The '\' is a trick to stop the grep from matching itself in the ps output.
>
> The above won't work on OS X, because the running gnucash is called
> Gnucash-bin. Changing the matches to Gnu\cash-bin will probably work as
> desired on OS X.
>
> Similarly,
>
> killall Gnucash-bin
>
> Peter
>
>
> On 23/09/13 13:36, Buddha Buck wrote:
>
>> 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>
>>> <**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.
>>>
>>>  ______________________________**_________________
>> 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.
>>
>>
> ______________________________**_________________
> 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