Wen Liang 2022-08-25 12:38:10 -04:00
commit a5d8f8321f
3 changed files with 15 additions and 1 deletions

View file

@ -191,7 +191,8 @@ _gl_pid_kill_external(void)
if (!g_file_get_contents(PIDFILE, &contents, NULL, &error)) {
if (g_error_matches(error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
do_unlink = FALSE;
_LOGD("spawn: failure to read pidfile %s: %s", PIDFILE, error->message);
else
_LOGD("spawn: failure to read pidfile %s: %s", PIDFILE, error->message);
g_clear_error(&error);
goto handle_kill;
}
@ -667,6 +668,14 @@ _gl_pid_spawn(const char *dm_binary,
/*****************************************************************************/
void
nm_dnsmasq_kill_external(void)
{
_gl_pid_kill_external();
}
/*****************************************************************************/
typedef struct {
GDBusConnection *dbus_connection;

View file

@ -25,4 +25,6 @@ GType nm_dns_dnsmasq_get_type(void);
NMDnsPlugin *nm_dns_dnsmasq_new(void);
void nm_dnsmasq_kill_external(void);
#endif /* __NETWORKMANAGER_DNS_DNSMASQ_H__ */

View file

@ -2506,6 +2506,9 @@ again:
self);
}
if (!NM_IS_DNS_DNSMASQ(priv->plugin))
nm_dnsmasq_kill_external();
_update_pending_maybe_changed(self);
g_object_thaw_notify(G_OBJECT(self));