From: "Todd C. Miller" Subject: Re: [PATCH portable] portable: build closefrom unconditionally To: Stefan Sperling Cc: Anna “CyberTailor” , gameoftrees@openbsd.org Date: Thu, 09 Dec 2021 08:49:19 -0700 I think you should just not check the return value of closefrom(). It is void on Solaris where it originated, OpenBSD is the outlier here because it is a syscall. Or you can just set the close-on-exec flag for all the fds you open and avoid closefrom() altogether. - todd