commit 4a55b231883da25896fe302c04b11284bad0e125 from: Stefan Sperling date: Thu Dec 09 16:10:25 2021 UTC ignore the return value of closefrom(2); patch by Anna a.k.a. CyberTailor millert@ suggests that this check is not needed, and that ideally we should be using close-on-exec instead. I will look into this, but in the meantime this change will help -portable: https://bugs.gentoo.org/828003 commit - 5a5ede53c0cd62e19882a7090ef08f4c817c21e9 commit + 4a55b231883da25896fe302c04b11284bad0e125 blob - 990151b1a2bdf4ad27602e91cfa25a19c9786813 blob + 6cf7e9a2ee72ca78311d0d9a16088324b574dfd6 --- lib/privsep.c +++ lib/privsep.c @@ -2764,14 +2764,12 @@ got_privsep_exec_child(int imsg_fds[2], const char *pa } if (dup2(imsg_fds[1], GOT_IMSG_FD_CHILD) == -1) { - fprintf(stderr, "%s: %s\n", getprogname(), strerror(errno)); - _exit(1); - } - if (closefrom(GOT_IMSG_FD_CHILD + 1) == -1) { fprintf(stderr, "%s: %s\n", getprogname(), strerror(errno)); _exit(1); } + closefrom(GOT_IMSG_FD_CHILD + 1); + if (execl(path, path, repo_path, (char *)NULL) == -1) { fprintf(stderr, "%s: %s: %s\n", getprogname(), path, strerror(errno));