commit f987c90b41240068719f2c9e5638fbd442adfdad from: Stefan Sperling date: Fri Jun 16 08:28:30 2023 UTC ignore write errors to pack children while closing a repository If the child has exited for some reason then we won't be able to send a stop message on the pipe. Ignore such errors while we are tearing a repository data structure down. The error should be harmless but can trip up gotwebd when cycling repositories out of its repo cache: gotwebd[29683]: gotweb_render_index: got-portable.git: unexpected end of file commit - f4a5cef1546205afab47f148edefabcf77c06d3b commit + f987c90b41240068719f2c9e5638fbd442adfdad blob - 6a757d85bc1ec107e2faa5b5d8a2f03388bef3d7 blob + 4e71a4e99ffaf5422e72a6b4039c70bc6a837630 --- lib/repository.c +++ lib/repository.c @@ -872,6 +872,8 @@ got_repo_close(struct got_repository *repo) imsg_clear(repo->privsep_children[i].ibuf); free(repo->privsep_children[i].ibuf); err = got_privsep_send_stop(repo->privsep_children[i].imsg_fd); + if (err && err->code == GOT_ERR_EOF) + err = NULL; child_err = got_privsep_wait_for_child( repo->privsep_children[i].pid); if (child_err && err == NULL)