From: Russ Cox <rsc@swtch.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] 9vx and create (...DMEXCL)
Date: Tue, 22 Dec 2009 08:31:14 -0800 [thread overview]
Message-ID: <dd6fe68a0912220831q5f38fab0m6e8985fcc910a679@mail.gmail.com> (raw)
In-Reply-To: <1c5f6c9c85185a32b8833d01de47e34d@terzarima.net>
> no, it won't: OEXCL, perhaps, but not DMEXCL.
> i'd have thought it should be used in fscreate, though,
> to help chan.c implement OEXCL correctly. fscreate should
> fail if the file exists, but perhaps that happens another way.
yes, there's a bug.
fscreate should or in O_EXCL unconditionally here
to implement the correct 9p create semantics:
if((fd = open(path, mm|O_CREAT, 0666)) < 0)
oserror();
the or'ing in is unconditional because create(5)
always fails when the target already exists.
the OEXCL in create(2) is a kernel-only flag
(not part of 9p), like OCEXEC.
russ
next prev parent reply other threads:[~2009-12-22 16:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <<bcba51a0912211848n63cca76es7a2a42993f3635bd@mail.gmail.com>
2009-12-22 3:27 ` erik quanstrom
2009-12-22 9:51 ` Charles Forsyth
2009-12-22 16:31 ` Russ Cox [this message]
2009-12-22 15:44 ` Dmitry Golubovsky
[not found] <<1c5f6c9c85185a32b8833d01de47e34d@terzarima.net>
2009-12-22 14:19 ` erik quanstrom
2009-12-22 2:48 Dimitry Golubovsky
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=dd6fe68a0912220831q5f38fab0m6e8985fcc910a679@mail.gmail.com \
--to=rsc@swtch.com \
--cc=9fans@9fans.net \
/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;
as well as URLs for NNTP newsgroup(s).