about summary refs log tree commit diff
path: root/src/dnsmasq-manager/nm-dnsmasq-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dnsmasq-manager/nm-dnsmasq-manager.c')
-rw-r--r--src/dnsmasq-manager/nm-dnsmasq-manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dnsmasq-manager/nm-dnsmasq-manager.c b/src/dnsmasq-manager/nm-dnsmasq-manager.c
index e6c67a1e..701c0782 100644
--- a/src/dnsmasq-manager/nm-dnsmasq-manager.c
+++ b/src/dnsmasq-manager/nm-dnsmasq-manager.c
@@ -18,6 +18,7 @@
  * Copyright (C) 2008 - 2010 Red Hat, Inc.
  */
 
+#include <config.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <signal.h>
@@ -385,7 +386,7 @@ kill_existing_for_iface (const char *iface, const char *pidfile)
 		goto out;
 
 	if (strstr (cmdline_contents, "bin/dnsmasq")) {
-		if (kill (pid, 0)) {
+		if (kill (pid, 0) == 0) {
 			nm_log_dbg (LOGD_SHARING, "Killing stale dnsmasq process %ld", pid);
 			kill (pid, SIGKILL);
 		}