srv, ibus: a note the daemon lives through keeps its endpoints

srvnote and addrnote unlinked on any note at all, and plan9port marks
SIGPIPE Ignore: notify.c:59 lists it, and signotify runs the handler
chain first and only then finds the Ignore flag and returns.  So one
broken pipe took the IPC socket and the IBus address file away from a
daemon that went on running -- measured on a private runtime dir, a
single kill -PIPE left the process in state Ssl with both files gone,
so every client that focused a widget afterwards silently had no input
method and only a restart brought it back.

libxcb writes with writev, so the note is a broken X connection away;
today xim.c's die() masks it by taking the daemon down on the same
event, which is exactly why the two must not depend on each other.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-18 13:59:13 +09:00
parent dab80b3a77
commit 997e4c8d93
4 changed files with 47 additions and 5 deletions

4
srv.c
View File

@@ -26,8 +26,8 @@ static int
srvnote(void *v, char *note)
{
USED(v);
USED(note);
srvunlink();
if(notefatal(note))
srvunlink();
return 0;
}