From: Ulrich Drepper <drepper@redhat.com>
To: Jim Meyering <meyering@gmail.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
linux-kernel@vger.kernel.org, akpm@osdl.org, torvalds@osdl.org
Subject: Re: [PATCH 0/3] *at syscalls: Intro
Date: Fri, 16 Dec 2005 08:24:53 -0800 [thread overview]
Message-ID: <43A2EA55.9070602@redhat.com> (raw)
In-Reply-To: <eeb5c3c50512160332v3f026766w2c954f1482e84616@mail.gmail.com>
Jim Meyering wrote:
> FYI, the rm in coreutils-cvs is finally thread-safe and race-free,
> when using openat et al.
Actually, Jim, I doubt it. There is one more race which cannot be
solved with the existing interfaces. I want to tackle this next, after
these changes are decided on.
The problem is directory creation and then populating it. As in cp -r
and any backup tool. You currently have to use (at best)
mkdirat(fd, "some-dir", 0666);
dfd = openat(fd, "some-dir", O_RDONLY);
What is needed is a way to create a new directory and return a file
descriptor for it.
I was thinking about using
dfd = openat(fd, "some-dir", O_RDONLY|O_DIRECTORY|O_CREAT, S_IFDIR|0666)
where the combination of using O_DIRECTORY, O_RDONLY, O_CREAT, and the
S_IFDIR flag can be recognized. This is a configuration which cannot be
used successfully in current code. Should probably also work with open().
--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
next prev parent reply other threads:[~2005-12-16 16:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-15 22:49 [PATCH 0/3] *at syscalls: Intro Ulrich Drepper
2005-12-16 0:32 ` Jeff Garzik
2005-12-16 1:29 ` Ulrich Drepper
2005-12-16 1:39 ` Jeff Garzik
2005-12-16 11:32 ` Jim Meyering
2005-12-16 16:24 ` Ulrich Drepper [this message]
2005-12-16 16:36 ` Jakub Jelinek
2005-12-16 19:59 ` Jim Meyering
2005-12-16 1:13 ` Nicholas Miell
2005-12-16 17:51 ` Linus Torvalds
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=43A2EA55.9070602@redhat.com \
--to=drepper@redhat.com \
--cc=akpm@osdl.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=meyering@gmail.com \
--cc=torvalds@osdl.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox