Am 01.01.23 um 22:51 schrieb selva.n...@gmail.com:
From: Selva Nair <selva.n...@gmail.com>

Signals are ordered as SIGUSR2, SIGUSR1, SIGHUP, SIGTERM, SIGINT
in increasing priority. Lower priority signals are not allowed to
overwrite higher ones.

This should fix Trac #311, #639 -- SIGTER/SIGINT lost during dns resolution.
(except for the Windows-specific bug handled in next commit)

On sending SIGTERM during dns resolution, it still takes several seconds
to terminate as the signal will get processed only after getaddrinfo times out
twice (in phase1 and phase2 inits).

Github: fixes OpenVPN/openvpn#205
Note: one has to still wait for address resolution to time out as getaddrinfo()
is no interruptible. But a single ctrl-C (and some patience) is enough.

Thanks. This looks like a good approach. I know there is some other similar bug somewhere else that has been forever on my todo list of my Android app and also the problem with signal ordering.

Acked-By: Arne Schwabe <a...@rfc2549.org>

While reviewing the patch, I noticed that SIG_SOURCE_SOFT/SIG_SOURCE_HARD seems to be purely informational and have no real other meaning.


_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to