From 35b1ed9082eebbcebee1b09792f9e5652f1005d3 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 7 Oct 2010 14:06:50 -0500 Subject: [PATCH] dns: actually kill stale dnsmasq process Interpret the return value of kill(2) correctly... --- src/dns-manager/nm-dns-plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dns-manager/nm-dns-plugin.c b/src/dns-manager/nm-dns-plugin.c index d47640b1c3..5766a90d43 100644 --- a/src/dns-manager/nm-dns-plugin.c +++ b/src/dns-manager/nm-dns-plugin.c @@ -106,7 +106,7 @@ kill_existing (const char *progname, const char *pidfile, const char *kill_match goto out; if (strstr (cmdline_contents, kill_match)) { - if (kill (pid, 0)) { + if (kill (pid, 0) == 0) { nm_log_dbg (LOGD_DNS, "Killing stale %s child process %ld", progname, pid); kill (pid, SIGKILL); }