From 55a5bf580dbb69eec825d5e5be7f0529de1acdcc Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Fri, 3 Feb 2017 18:20:19 +0100 Subject: [PATCH] dns-unbound: avoid using nm_spawn_process() It doesn't improve anything and is the last user of said function. --- src/dns/nm-dns-unbound.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dns/nm-dns-unbound.c b/src/dns/nm-dns-unbound.c index 3659beacb..6af4bad88 100644 --- a/src/dns/nm-dns-unbound.c +++ b/src/dns/nm-dns-unbound.c @@ -43,6 +43,9 @@ update (NMDnsPlugin *plugin, const NMGlobalDnsConfig *global_config, const char *hostname) { + char *argv[] = { DNSSEC_TRIGGER_SCRIPT, "--async", "--update", NULL }; + int status; + /* TODO: We currently call a script installed with the dnssec-trigger * package that queries all information itself. Later, the dependency * on that package will be optional and the only hard dependency will @@ -52,7 +55,9 @@ update (NMDnsPlugin *plugin, * without calling custom scripts. The dnssec-trigger functionality * may be eventually merged into NetworkManager. */ - return nm_spawn_process (DNSSEC_TRIGGER_SCRIPT " --async --update", NULL) == 0; + if (!g_spawn_sync ("/", argv, NULL, 0, NULL, NULL, NULL, NULL, &status, NULL)) + return FALSE; + return (status == 0); } static gboolean