srv, ibus: remove the endpoints on a signal too
A stopped daemon left its socket and IBus address file behind, since plan9port ends a process on SIGTERM without running exit handlers. Both files now go on a note as well as on exit, and only while they are still the ones this daemon made, so a successor is never robbed of its own.
This commit is contained in:
@@ -334,6 +334,9 @@ main(int argc, char **argv)
|
||||
showerrors(&daemon);
|
||||
if(!stopdaemon(&daemon))
|
||||
ok = 0;
|
||||
/* SIGTERM must leave no socket behind. */
|
||||
if(access(live.socket, F_OK) == 0)
|
||||
ok = fail("socket %s survived the daemon", live.socket);
|
||||
if(!closeerrors(&daemon))
|
||||
ok = 0;
|
||||
if(!liveclean(&live))
|
||||
|
||||
Reference in New Issue
Block a user