The agent's comment on socket removal describes how a flan dev session removes it now.
This commit is contained in:
parent
aa6a007c7e
commit
6170f50061
13
vendor/agent/flan_agent.c
vendored
13
vendor/agent/flan_agent.c
vendored
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user