dns: actually kill stale dnsmasq process

Interpret the return value of kill(2) correctly...
This commit is contained in:
Dan Williams 2010-10-07 14:06:50 -05:00
parent 8502f0c874
commit 35b1ed9082

View file

@ -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);
}