/********************************************/
+static void
+_clear_pidfile (NMDnsPlugin *self)
+{
+ NMDnsPluginPrivate *priv = NM_DNS_PLUGIN_GET_PRIVATE (self);
+
+ if (priv->pidfile) {
+ unlink (priv->pidfile);
+ g_free (priv->pidfile);
+ priv->pidfile = NULL;
+ }
+}
+
static void
kill_existing (const char *progname, const char *pidfile, const char *kill_match)
{
g_free (priv->progname);
priv->progname = NULL;
- if (priv->pidfile) {
- unlink (priv->pidfile);
- g_free (priv->pidfile);
- priv->pidfile = NULL;
- }
+ _clear_pidfile (self);
g_signal_emit (self, signals[CHILD_QUIT], 0, status);
}
priv->progname = NULL;
}
- if (priv->pidfile) {
- unlink (priv->pidfile);
- g_free (priv->pidfile);
- priv->pidfile = NULL;
- }
+ _clear_pidfile (self);
return TRUE;
}