9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "G. David Butler" <gdb@dbSystems.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] create/create race
Date: Wed, 30 Nov 2016 07:14:59 -0600	[thread overview]
Message-ID: <F0FED314-8A3B-48D6-BD12-DA23C28A8A37@dbSystems.com> (raw)
In-Reply-To: <CAHL7psHKnEHLR6GxF4GKGdVFHuzigA9CfVdteqPjnOy4PPn5-g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]

Wow, this is a sore subject. Check the archives of this list for a long version of this discussion.

David

Sent from my phone. Please excuse misspellings and terseness.


> On Nov 30, 2016, at 5:04 AM, Giacomo Tesio <giacomo@tesio.it> wrote:
> 
> Hi guys, I know this is a noob question, but I'd really like to understand this aspect of the kernel design.
> 
> I'm planning to experiment on the topic, modifying chan.c so that the semantics of create(2) match those of create(5) about existing files. I guess that the number of callers to fix is manageable.
> 
> But since I can't see any good reason for the race being there in the first place (except maybe backward compatibility with unix, but that was not a problem for Plan 9 designers), I'm pretty sure I'm missing something obvious.
> 
> 
> So, please, do you know why the create syscall does not simply return an error if the file already exists?
> You might save me a few headache... 
> 
> 
> Thanks for your help!
> 
> 
> Giacomo
> 
> 
> 
> 2016-05-24 23:25 GMT+02:00 Giacomo Tesio <giacomo@tesio.it>:
>> I'm pretty curious about the create(2)/create(5) race described in a comment in namec (see https://github.com/brho/plan9/blob/master/sys/src/9/port/chan.c#L1564-L1603)
>> 
>> Does anyone know or remember the reasoning behind this design?
>> 
>> What was wrong about using the create(5) semantics for the create(2) syscall?
>> 
>> 
>> Giacomo
> 

[-- Attachment #2: Type: text/html, Size: 2630 bytes --]

  parent reply	other threads:[~2016-11-30 13:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 21:25 Giacomo Tesio
2016-11-30 11:04 ` Giacomo Tesio
2016-11-30 11:19   ` cinap_lenrek
2016-11-30 13:14   ` G. David Butler [this message]
2016-11-30 13:32     ` cinap_lenrek
2016-11-30 13:53       ` Charles Forsyth
2016-11-30 15:02         ` Giacomo Tesio
2016-11-30 15:08           ` Charles Forsyth
2016-11-30 15:28             ` Giacomo Tesio
2016-11-30 15:34               ` Charles Forsyth
2016-11-30 15:40               ` cinap_lenrek
2016-11-30 16:16                 ` Giacomo Tesio
2016-11-30 21:51                   ` Charles Forsyth
2016-11-30 21:53                     ` Charles Forsyth
2016-11-30 23:15                       ` Giacomo Tesio

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=F0FED314-8A3B-48D6-BD12-DA23C28A8A37@dbSystems.com \
    --to=gdb@dbsystems.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).