]> git.giacomolli.uk - onechat/commit
Check the socket path before the daemon writes
authorAnderson A. Giacomolli <agiacomolli@gmail.com>
Sat, 7 Nov 2026 02:53:53 +0000 (23:53 -0300)
committerAnderson A. Giacomolli <agiacomolli@gmail.com>
Sat, 7 Nov 2026 02:53:53 +0000 (23:53 -0300)
commit8b892c6a3384f510940c8a31e007ad97932f9af5
treed5d0e138d5b71accd8e9658d98a2c9156a38d0b0
parent97274864799ac2eea84bf80c9727a810b695db55
Check the socket path before the daemon writes

The daemon checks the length of the socket path first, before it reads
the config, takes the token lock, or opens the agent. With a data
directory whose path is too long, it gives the error and leaves the
directory empty, so a failed start leaves no agent or lock file behind.

Issue: 5daf23e
daemon.go
daemon_test.go