From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio To: passt-dev@passt.top Subject: Re: [PATCH 3/3] Don't unnecessarily avoid CLOEXEC flags Date: Wed, 24 Aug 2022 22:20:39 +0200 Message-ID: <20220824222039.2fbb8b40@elisabeth> In-Reply-To: <20220823063151.854034-4-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3943783706465242063==" --===============3943783706465242063== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Tue, 23 Aug 2022 16:31:51 +1000 David Gibson wrote: > There are several places in the passt code where we have lint overrides > because we're not adding CLOEXEC flags to open or other operations. > Comments suggest this is because it's before we fork() into the background > but we'll need those file descriptors after we're in the background. > > However, as the name suggests CLOEXEC closes on exec(), not on fork(). ...after looking into it and trying to remember: it seems like the only reason why I skipped O_CLOEXEC here was some bogus innate assumption I had about file descriptors being closed on clone() too. Thanks for spotting this. -- Stefano --===============3943783706465242063==--