From: Alexey Izbyshev <izbyshev@ispras.ru>
To: musl@lists.openwall.com
Cc: Guilherme Janczak <guilherme.janczak@yandex.com>
Subject: Re: [musl] [PATCH] add close_range() syscall wrapper
Date: Thu, 18 Aug 2022 17:54:50 +0300 [thread overview]
Message-ID: <cff701355849519f2d071551caa86a32@ispras.ru> (raw)
In-Reply-To: <CAA2zVHruVQQYfmiYCpVJ0ha5nX_mvwoCNBX9x6qO79WUDDU_QA@mail.gmail.com>
On 2022-08-18 17:42, James Y Knight wrote:
> On Thu, Aug 18, 2022 at 6:40 AM Alexey Izbyshev <izbyshev@ispras.ru>
> wrote:
>
>> Glibc doesn't implement a fallback and explicitly says it in the
>> manual.
>> Using a different implementation in musl seems undesirable.
>
> True. I would note, however, that glibc also implements another
> function "closefrom", which first calls close_range, and if it fails,
> falls back to iterating /proc/self/fd.
Yes, but glibc's closefrom() *aborts* if there is no /proc, so it's not
suitable for all use cases (and would not be suitable for CPython's
subprocess or "os.closerange()", for instance).
Alexey
next prev parent reply other threads:[~2022-08-18 14:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-10 13:03 Guilherme Janczak
2022-08-18 0:35 ` Rich Felker
2022-08-18 10:11 ` Érico Nogueira
2022-08-18 10:40 ` Alexey Izbyshev
2022-08-18 14:42 ` James Y Knight
2022-08-18 14:54 ` Alexey Izbyshev [this message]
2022-08-18 12:31 ` Guilherme Janczak
2023-09-01 8:02 Natanael Copa
2023-09-01 13:57 ` Rich Felker
2023-09-01 14:55 ` Natanael Copa
2023-09-01 15:06 ` Rich Felker
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=cff701355849519f2d071551caa86a32@ispras.ru \
--to=izbyshev@ispras.ru \
--cc=guilherme.janczak@yandex.com \
--cc=musl@lists.openwall.com \
/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://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).