"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
"Omar Polo" <op@omarpolo.com>
Subject:
gotwebd: no need to close fds after imsg_compose()
To:
gameoftrees@openbsd.org
Date:
Mon, 04 Aug 2025 18:52:57 +0200

Download raw body.

Thread
  • Omar Polo:

    gotwebd: no need to close fds after imsg_compose()

they're closed implicitly in send_imsg when we flush the imsg.

ok?

diff /home/op/w/got
path + /home/op/w/got
commit - ce6204164ae9cc9e4be847122484967b4c3c33c1
blob - 01affdd22c9241eabef71fd1fc28c0ec9c226800
file + gotwebd/gotwebd.c
--- gotwebd/gotwebd.c
+++ gotwebd/gotwebd.c
@@ -575,9 +575,6 @@ connect_children(struct gotwebd *env)
 
 		if (send_imsg(iev2, GOTWEBD_IMSG_CTL_PIPE, pipe[1], NULL, 0))
 			fatal("send_imsg");
-
-		close(pipe[0]);
-		close(pipe[1]);
 	}
 }