dns: cleanup pid file when dnsmasq process terminated

[thaller@redhat.com: extracted the patch from a larger one]

https://mail.gnome.org/archives/networkmanager-list/2016-March/msg00144.html

Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
This commit is contained in:
Mathieu Trudel-Lapierre
2016-03-22 10:03:44 -04:00
committed by Thomas Haller
parent 99ef0d26e2
commit 2bb769cf10

View File

@@ -133,6 +133,12 @@ watch_cb (GPid pid, gint status, gpointer user_data)
g_free (priv->progname); g_free (priv->progname);
priv->progname = NULL; priv->progname = NULL;
if (priv->pidfile) {
unlink (priv->pidfile);
g_free (priv->pidfile);
priv->pidfile = NULL;
}
g_signal_emit (self, signals[CHILD_QUIT], 0, status); g_signal_emit (self, signals[CHILD_QUIT], 0, status);
} }