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
|
* 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.
|
* 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
|
* Under [flan dev] the session's own end also covers it: the two-process
|
||||||
* is worth being exact about rather than claiming cover it does not give: the
|
* daemon stops its child with SIGTERM, which [fatal_unlink] sees, and the
|
||||||
* two-process daemon kills its child with SIGTERM, whose default disposition
|
* merged session leaves by [Unix._exit 0] after removing its temp directory,
|
||||||
* runs no atexit, and the merged session leaves by [Unix._exit 0]. So the
|
* the socket with it (lib/dev.ml, [remove_session_dirs]). */
|
||||||
* 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. */
|
|
||||||
static void unlink_bound_sock(void) {
|
static void unlink_bound_sock(void) {
|
||||||
if (bound_sock[0] != '\0') unlink(bound_sock);
|
if (bound_sock[0] != '\0') unlink(bound_sock);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user