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
diff --git a/lib/privsep.c b/lib/privsep.c
index 990151b..6cf7e9a 100644
--- a/lib/privsep.c
+++ b/lib/privsep.c
@@ -2767,10 +2767,8 @@ got_privsep_exec_child(int imsg_fds[2], const char *path, const char *repo_path)
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,