commit beb5455b68cf2c6513db813b7e36635a5685f95e from: Stefan Sperling date: Sun Aug 20 14:26:29 2023 UTC gotsh: do not set POLLOUT flag when there is no data to send Prevent an endless polling loop on Linux where POLLOUT and POLLHUP can both be reported via pollfd revents. commit - 80d26ca3d93a5d28ab622f6cb5d91ac973062bcb commit + beb5455b68cf2c6513db813b7e36635a5685f95e blob - b811009e08d9088194ccc086a17fcecac0da7fde blob + 7dd5a1417fcdb549a4424a71d36c5b74480ac8bb --- lib/serve.c +++ lib/serve.c @@ -1103,7 +1103,7 @@ recv_packfile(struct imsg *imsg, int infd) if (r == 0) { /* Detect gotd(8) closing the pack pipe when done. */ - err = got_poll_fd(packfd, POLLOUT, 1); + err = got_poll_fd(packfd, 0, 1); if (err) { if (err->code != GOT_ERR_EOF) break;