NetworkManager/src/ppp
Thomas Haller eaf36db68b core: add and use NM_SHUTDOWN_TIMEOUT_MS as duration that we plan for shutdown
nm_ppp_manager_stop() wants to ensure that the pppd process is really
gone. For that it uses nm_utils_kill_child_async() to first send
SIGTERM, and sending SIGKILL after a timeout.

Later, we want to fix shutdown of NetworkManager to iterate the mainloop
during shutdown, so that such operations are still handled. However, we
can only delay shutdown for a certain time. After a timeout (NM_SHUTDOWN_TIMEOUT_MS
plus NM_SHUTDOWN_TIMEOUT_MS_GRACE) we really have to give up and
terminate.

That means, the right amount of time between sending SIGTERM and SIGKILL
is exactly NM_SHUTDOWN_TIMEOUT_MS. Hopefully that is of course
sufficient in the first place. If not, send SIGKILL afterwards, and give
a bit more time (NM_SHUTDOWN_TIMEOUT_MS_GRACE) to reap the child.
And if all this time is still not enough, something is really odd and we
abort waiting, with a warning in the logfile.

Since we don't properly handle shutdown yet, the description above is
not really true. But with this patch, we fix it from point of view of
NMPPPManager.
2018-05-25 12:35:49 +02:00
..
meson.build meson: distinguish arch specific and arch neutral lib dir 2018-05-09 12:59:39 +02:00
nm-ppp-manager-call.c ppp-manager: rework stopping NMPPPManager by merging async/sync methods 2018-05-25 12:35:49 +02:00
nm-ppp-manager-call.h ppp-manager: rework stopping NMPPPManager by merging async/sync methods 2018-05-25 12:35:49 +02:00
nm-ppp-manager.c core: add and use NM_SHUTDOWN_TIMEOUT_MS as duration that we plan for shutdown 2018-05-25 12:35:49 +02:00
nm-ppp-manager.h ppp-manager: rework stopping NMPPPManager by merging async/sync methods 2018-05-25 12:35:49 +02:00
nm-ppp-plugin-api.h ppp-manager: rework stopping NMPPPManager by merging async/sync methods 2018-05-25 12:35:49 +02:00
nm-ppp-plugin.ver ppp: split ppp manager into a plugin 2016-12-06 11:08:11 +01:00
nm-ppp-status.h ppp: split ppp manager into a plugin 2016-12-06 11:08:11 +01:00
nm-pppd-plugin.c ppp/plugin: use g_strlcpy() 2018-02-12 20:46:47 +01:00
nm-pppd-plugin.h build: rename "src/ppp-manager" to "src/ppp" 2016-11-21 14:07:47 +01:00