summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Trudel-Lapierre <mathieu.tl@gmail.com>2016-03-22 10:03:44 -0400
committerThomas Haller <thaller@redhat.com>2016-03-22 16:44:33 +0100
commit2bb769cf10ab9c19c1690753405352a0f7082dde (patch)
tree45d7e15cacbaf36b80854d8f3c900f6fbdfd95fb
parent99ef0d26e296ac4b3ec3b71817aef1ade90d8314 (diff)
downloadNetworkManager-2bb769cf10ab9c19c1690753405352a0f7082dde.tar.gz
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>
-rw-r--r--src/dns-manager/nm-dns-plugin.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dns-manager/nm-dns-plugin.c b/src/dns-manager/nm-dns-plugin.c
index 029072223e..be9673e16c 100644
--- a/src/dns-manager/nm-dns-plugin.c
+++ b/src/dns-manager/nm-dns-plugin.c
@@ -133,6 +133,12 @@ watch_cb (GPid pid, gint status, gpointer user_data)
g_free (priv->progname);
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);
}