mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 17:30:09 +01:00
dispatcher: log warning when nm-dispatcher quits with requests pending
This commit is contained in:
parent
acc335aad4
commit
7ea76c07e5
1 changed files with 15 additions and 0 deletions
|
|
@ -1080,6 +1080,21 @@ main (int argc, char **argv)
|
|||
|
||||
done:
|
||||
|
||||
if (gl.num_requests_pending > 0) {
|
||||
/* this only happens when we quit due to SIGTERM (not due to the idle timer).
|
||||
*
|
||||
* Log a warning about pending scripts.
|
||||
*
|
||||
* Maybe we should notify NetworkManager that these scripts are left in an unknown state.
|
||||
* But this is either a bug of a dispatcher script (not terminating in time).
|
||||
*
|
||||
* FIXME(shutdown): Also, currently NetworkManager behaves wrongly on shutdown.
|
||||
* Note that systemd would not terminate NetworkManager-dispatcher before NetworkManager.
|
||||
* It's NetworkManager's responsibility to keep running long enough so that all requests
|
||||
* can complete (with a watchdog timer, and a warning that user provided scripts hang). */
|
||||
_LOG_X_W ("exiting but there are still %u requests pending", gl.num_requests_pending);
|
||||
}
|
||||
|
||||
if (dbus_own_name_id != 0)
|
||||
g_bus_unown_name (nm_steal_int (&dbus_own_name_id));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue