docker-offlineimap/offlineimap
Chris Smart eb2bd80851 init: register SIGABRT and handle as per SIGUSR2
systemd supports a watchdog (via the WatchdogSec service file option)
which will send the program a SIGABRT when the timer expires, however
currently this causes offlineimap to be killed immediately.

This patch registers SIGABRT and handles it in the same manner as
SIGUSR2, so that the current synchronisation is completed before the
program exits safely.

This makes offlineimap more flexible and robust for persistent setups
that make use of holdconnectionopen and autorefresh options.

For example, it may be useful in assisting with the occasional
situation where offlineimap may not return successfully after a suspend
and resume.

To make use of this, users could add the following to the [Service]
section of their systemd offlineimap service file (restart every 5
minutes):

Restart=on-watchdog
WatchdogSec=300

Signed-off-by: Chris Smart <mail@csmart.io>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-01-23 14:20:07 +01:00
..
folder learn repository retrycount configuration option 2016-12-19 12:55:55 +01:00
repository repository: IMAP: correctly check the response while listing remote folders 2017-01-22 19:20:32 +01:00
ui Fix flickering in Blinkenlights UI 2016-10-20 14:11:51 +02:00
utils Add OpenSUSE to list of supported distros 2016-11-03 16:35:24 +01:00
__init__.py v7.0.12 2016-11-30 22:40:59 +01:00
accounts.py accounts: minor code refactoring 2016-11-20 20:22:37 +01:00
bundled_imaplib2.py bump from imaplib2 v2.53 to v2.55 2016-06-11 11:08:02 +02:00
CustomConfig.py ConfigHelperMixin must be new-style class to not break inheritance 2016-07-30 04:26:25 +02:00
emailutil.py Rename email.Parser to email.parser 2016-05-10 02:53:09 +02:00
error.py more consistent style 2015-01-07 21:31:43 +01:00
globals.py fix: when called with -a, mbnames must not erase entries of other accounts 2016-06-25 17:33:42 +02:00
imaplibutil.py improve error message when ssl_version must be set due to the tls_level 2016-07-25 03:29:25 +02:00
imapserver.py learn authproxy configuration option 2016-12-19 12:20:19 +01:00
imaputil.py Fix utf7 decode error not caught 2016-11-02 12:27:00 +01:00
init.py init: register SIGABRT and handle as per SIGUSR2 2017-01-23 14:20:07 +01:00
localeval.py minor code enhancements 2016-07-28 00:42:35 +02:00
mbnames.py Fix mbnames writing with folders using utf-8 2016-11-02 12:30:03 +01:00
threadutil.py fix the profile mode 2016-11-08 07:11:33 +01:00
virtual_imaplib2.py bump from imaplib2 v2.53 to v2.55 2016-06-11 11:08:02 +02:00