From bb1c46f66d4b15329d2fb7613e3a08d5d52c721e Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 31 Mar 2014 12:57:16 -0400 Subject: [PATCH] man: updates to the dispatcher section Mention that the dispatcher kills slow scripts (https://bugzilla.redhat.com/show_bug.cgi?id=982734) and that it runs all scripts that have been queued, even if later events make that "wrong". (Mentioned in https://bugzilla.gnome.org/show_bug.cgi?id=721971, although that bug proposes changing this behavior, not documenting it.) --- man/NetworkManager.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/man/NetworkManager.xml b/man/NetworkManager.xml index 5ef19b890a..70e49aa16a 100644 --- a/man/NetworkManager.xml +++ b/man/NetworkManager.xml @@ -194,6 +194,15 @@ In case of VPN, VPN_IP_IFACE is set, and IP4_*, IP6_* variables with VPN prefix are exported too, like VPN_IP4_ADDRESS_0, VPN_IP4_NUM_ADDRESSES. + + Dispatcher scripts are run one at a time, but asynchronously from the main + NetworkManager process, and will be killed if they run for too long. If your script + might take arbitrarily long to complete, you should spawn a child process and have the + parent return immediately. Also beware that once a script is queued, it will always be + run, even if a later event renders it obsolete. (Eg, if an interface goes up, and then + back down again quickly, it is possible that one or more "up" scripts will be run + after the interface has gone down.) +