The agent socket is to bind only for the daemon that launched the program

This commit is contained in:
Joseph Ferano 2026-09-25 10:14:48 +07:00
parent dab556ab7f
commit 9dd7dd4137

View File

@ -1570,7 +1570,8 @@ that polls or waits. Full invisibility — a dev build linking the agent whether
not the source says so — needs the package force-linked and is a decision about not the source says so — needs the package force-linked and is a decision about
what =--dev= means. what =--dev= means.
** TODO FLAN_AGENT_SOCKET in a shell's environment steals the socket ** NEXT FLAN_AGENT_SOCKET in a shell's environment steals the socket
Decided 2026-09-25: narrow the gate. The daemon also exports its own pid, and the constructor binds the socket only when that pid is the program's parent (or the program itself, in a merged build).
Binding unlinks the path first, and before the constructor that unlink was reached Binding unlinks the path first, and before the constructor that unlink was reached
only by an explicit call. A sentence about the shape of the gate rather than an only by an explicit call. A sentence about the shape of the gate rather than an
observed problem: only the daemon sets the variable and it never runs release observed problem: only the daemon sets the variable and it never runs release