commit 8050095e3acba3100327de8abb9a427cb547089b from: Stefan Sperling via: Thomas Adam date: Thu Jun 22 13:10:34 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 - 0b16f49bed65694b1fb98f7eb484b700a7001a64 commit + 8050095e3acba3100327de8abb9a427cb547089b blob - 46248935c1ba42e65fb336a5f2a6128774dc58ba blob + 23dbb7bc21c9b25bb0c764457101d99b91e7795e --- lib/repository.c +++ lib/repository.c @@ -868,6 +868,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)