summaryrefslogtreecommitdiff
path: root/callouts
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2014-06-06 11:03:25 -0500
committerDan Williams <dcbw@redhat.com>2014-06-06 13:43:47 -0500
commit02252224e286dd3849467567ecbf0238a54e77a0 (patch)
tree2666f91fbf56cebe17ce11a4304f8edad90b26ea /callouts
parentfd5761ecb279abc6ecdfb9a3ebcd4c872a96ac56 (diff)
dispatcher: bump overall timeout to 10 minutes (rh #982734) (rh #1048345)
Since NM now handles long-running dispatcher scripts better, allow them to run for really long times.
Diffstat (limited to 'callouts')
-rw-r--r--callouts/nm-dispatcher.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/callouts/nm-dispatcher.c b/callouts/nm-dispatcher.c
index 7d2b7365cc..d66a0d8f94 100644
--- a/callouts/nm-dispatcher.c
+++ b/callouts/nm-dispatcher.c
@@ -383,6 +383,8 @@ child_setup (gpointer user_data G_GNUC_UNUSED)
setpgid (pid, pid);
}
+#define SCRIPT_TIMEOUT 600 /* 10 minutes */
+
static void
dispatch_one_script (Request *request)
{
@@ -400,7 +402,7 @@ dispatch_one_script (Request *request)
if (g_spawn_async ("/", argv, request->envp, G_SPAWN_DO_NOT_REAP_CHILD, child_setup, request, &script->pid, &error)) {
request->script_watch_id = g_child_watch_add (script->pid, (GChildWatchFunc) script_watch_cb, script);
- request->script_timeout_id = g_timeout_add_seconds (20, script_timeout_cb, script);
+ request->script_timeout_id = g_timeout_add_seconds (SCRIPT_TIMEOUT, script_timeout_cb, script);
} else {
g_warning ("Failed to execute script '%s': (%d) %s",
script->script, error->code, error->message);