GNOME Bugzilla – Bug 775165
consider using SIGINT to stop openconnect on disconnect
Last modified: 2017-07-11 09:48:05 UTC
Consider using SIGINT rather than SIGTERM to stop the openconnect process from the nm-openconnect-service. OpenConnect exits immediately on SIGTERM, but does a controlled shutdown on SIGINT. Something like the following (untested): diff --git a/src/nm-openconnect-service.c b/src/nm-openconnect-service.c index dc82a9f..85093b2 100644 --- a/src/nm-openconnect-service.c +++ b/src/nm-openconnect-service.c @@ -603,7 +603,7 @@ real_disconnect (NMVpnServicePlugin *plugin, NMOpenconnectPluginPrivate *priv = NM_OPENCONNECT_PLUGIN_GET_PRIVATE (plugin); if (priv->pid) { - if (kill (priv->pid, SIGTERM) == 0) + if (kill (priv->pid, SIGINT) == 0) g_timeout_add (2000, ensure_killed, GINT_TO_POINTER (priv->pid)); else kill (priv->pid, SIGKILL); --- Forwarded from the Debian BTS: https://bugs.debian.org/820892
Ping! This patch works fine on Debian 9. Any chance a Network Manager maintainer could have a look? Thanks!
(In reply to Mike Miller from comment #0) > Consider using SIGINT rather than SIGTERM to stop the openconnect process > from the nm-openconnect-service. OpenConnect exits immediately on SIGTERM, > but does a controlled shutdown on SIGINT. Thank you, the patch looks correct. Applied.