commit f8b1e9c78bbea3a865bd20b4d3061bc7af5d0d7d from: Stefan Sperling date: Wed Apr 16 10:04:41 2025 UTC set CLOEXEC and NONBLOCK flags on the pipe between server and gotweb procs commit - 2bd8d56a2d5e8d637430d608e9944a4b08e20187 commit + f8b1e9c78bbea3a865bd20b4d3061bc7af5d0d7d blob - c2c1ee12bd8c2ba3ff07a94f5979543839420273 blob + dd4fa760f7b0417c9999ae7ae64b0f98d3e23059 --- gotwebd/fcgi.c +++ gotwebd/fcgi.c @@ -220,7 +220,8 @@ process_request(struct request *c) struct request ic; struct event *resp_event = NULL; - if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe) == -1) { + if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, + PF_UNSPEC, pipe) == -1) { log_warn("socketpair"); return; } blob - 91799176b5f93d034ae4014bd3a97128c31aeee4 blob + 02db192da54f476ed3167e48965a6f6cb9d2af1c --- gotwebd/gotweb.c +++ gotwebd/gotweb.c @@ -1556,6 +1556,7 @@ recv_server_pipe(struct gotwebd *env, struct imsg *ims iev->handler = gotweb_dispatch_server; iev->data = iev; event_set(&iev->ev, fd, EV_READ, gotweb_dispatch_server, iev); + imsg_event_add(iev); env->iev_server = iev; } blob - 545307fa76d787a29d9bccaa41f4477b40f86c9f blob + 53c9174699f2eed0eb4714bee55e823d738698cd --- gotwebd/sockets.c +++ gotwebd/sockets.c @@ -418,6 +418,7 @@ recv_gotweb_pipe(struct gotwebd *env, struct imsg *ims iev->handler = server_dispatch_gotweb; iev->data = iev; event_set(&iev->ev, fd, EV_READ, server_dispatch_gotweb, iev); + imsg_event_add(iev); env->iev_gotweb = iev; }