void a_quit(void)
{
- close(sock.fd);
- if (sockname) unlink(sockname);
+ a_unlisten();
FOREACH_PEER(p, { p_destroy(p, 1); });
ps_quit();
exit(0);
sockname = name;
}
+/* --- @a_unlisten@ --- *
+ *
+ * Arguments: ---
+ *
+ * Returns: ---
+ *
+ * Use: Stops listening to the administration socket and removes it.
+ */
+
+void a_unlisten(void)
+{
+ if (!sockname) return;
+ sel_rmfile(&sock);
+ unlink(sockname);
+ close(sock.fd);
+}
+
/* --- @a_switcherr@ --- *
*
* Arguments: ---