Stopping a GDBusServer should clean up Unix socket paths (if not abstract) and nonce-tcp nonce files
On !911 (merged), @mcatanzaro noticed that stopping a
GDBusServer listening on
unix:tmpdir on a platform other than Linux, or the
unix:dir addresses added by !911 (merged) on any platform, will close the socket but not unlink it.
While confirming this, I also found this in
/* we could unlink the nonce file but I don't * think it's really worth the effort/risk */ g_free (server->nonce_file);
Steps to reproduce
Start with no files or directories matching
#!/usr/bin/python3 from gi.repository import Gio server = Gio.DBusServer.new_sync('unix:tmpdir=/tmp/gdbus', Gio.dbus_generate_guid(), None, None) server.start() server.stop() server = Gio.DBusServer.new_sync('nonce-tcp:', Gio.dbus_generate_guid(), None, None) server.start() server.stop()
There are still no files or directories matching
There is a file named
/tmp/gdbus-nonce-file-XMKQ3Z (name will vary).
On non-Linux there will also be a socket in
/tmp/gdbus/ (not confirmed).