From: Stefano Brivio <sbrivio@redhat.com>
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 [thread overview]
Message-ID: <20220824222039.2fbb8b40@elisabeth> (raw)
In-Reply-To: <20220823063151.854034-4-david@gibson.dropbear.id.au>
[-- Attachment #1: Type: text/plain, Size: 696 bytes --]
On Tue, 23 Aug 2022 16:31:51 +1000
David Gibson <david(a)gibson.dropbear.id.au> 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
next prev parent reply other threads:[~2022-08-24 20:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 6:31 [PATCH 0/3] Miscellaneous small fixes David Gibson
2022-08-23 6:31 ` [PATCH 1/3] conf: Fix incorrect bounds checking for sock_path parameter David Gibson
2022-08-23 6:31 ` [PATCH 2/3] gitignore README.plain.md David Gibson
2022-08-23 6:31 ` [PATCH 3/3] Don't unnecessarily avoid CLOEXEC flags David Gibson
2022-08-24 20:20 ` Stefano Brivio [this message]
2022-08-24 20:21 ` [PATCH 0/3] Miscellaneous small fixes Stefano Brivio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220824222039.2fbb8b40@elisabeth \
--to=sbrivio@redhat.com \
--cc=passt-dev@passt.top \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).