From 6170f50061c08b0f0cc3ccc98ac6bcf32c24caf4 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Sat, 26 Sep 2026 13:17:05 +0700 Subject: [PATCH] The agent's comment on socket removal describes how a flan dev session removes it now. --- vendor/agent/flan_agent.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/vendor/agent/flan_agent.c b/vendor/agent/flan_agent.c index 0ea62eb7..38d60e2b 100644 --- a/vendor/agent/flan_agent.c +++ b/vendor/agent/flan_agent.c @@ -1035,15 +1035,10 @@ static int sock_dir_fd = -1; * Outside a daemon that is the whole story, and the path is under TMPDIR where * nothing else would ever reclaim it. SIGKILL is the one end nothing survives. * - * Under [flan dev] none of the three is how a session usually ends, and this - * is worth being exact about rather than claiming cover it does not give: the - * two-process daemon kills its child with SIGTERM, whose default disposition - * runs no atexit, and the merged session leaves by [Unix._exit 0]. So the - * socket there is left in the daemon's temp directory — which is itself never - * removed today. TODO.org, "The daemon leaves its temp directory behind": the - * session-end cleanup that item asks for takes the socket with it, and until - * it lands the socket outlives the session. Nothing below can fix that from - * here; a program that is killed does not get to tidy up. */ + * Under [flan dev] the session's own end also covers it: the two-process + * daemon stops its child with SIGTERM, which [fatal_unlink] sees, and the + * merged session leaves by [Unix._exit 0] after removing its temp directory, + * the socket with it (lib/dev.ml, [remove_session_dirs]). */ static void unlink_bound_sock(void) { if (bound_sock[0] != '\0') unlink(bound_sock); }