archive mirror
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <>
To: "Ata, John" <>
Cc: Linux Kernel Mailing List <>
Subject: RE: incompatible open modes
Date: Thu, 31 Jul 2003 15:14:37 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0307311503350.180@chaos> (raw)
In-Reply-To: <>

On Thu, 31 Jul 2003, Ata, John wrote:

> Hi Andries,
> If that's what's been decided... I presume for backwards compatability,
> but it does seem rather odd though.  After all, it seems like O_RDONLY
> is supposed to safeguard someone from accidently overwriting a file.
> Otherwise why not automatically open everything read/write?  Going down
> the same path, what's next: automatically write enabling a file which
> has been openend for O_RDONLY the next time someone performs a write
> operation on it? ;-)
> Take care,
> John

Historically, the word "undefined" has become synonymous with
"worst possible thing" under Unix. If some operation is "undefined"
the implementor is free to low-level format your hard disk.

This is not a good thing. For instance, the MS-DOS 'open' has
defaults that are not harmful. Not so with Unix. There are no
defaults! You must be explicit. You can even create a file you
can't delete if you don't set the permissions correctly when
opening O_CREAT. Note you can even create a file called "*" and
"*.*". So, under Unix you gotta be careful. Like somebody's
.sig said; "Unix gives you enough rope to shoot yourself!"

Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
            Note 96.31% of all statistics are fiction.

  reply	other threads:[~2003-07-31 19:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-31 18:29 incompatible open modes Ata, John
2003-07-31 19:14 ` Richard B. Johnson [this message]
     [not found] <>
2003-07-31 17:03 ` Zack Brown
2003-07-31 17:35   ` Andries Brouwer

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.53.0307311503350.180@chaos \ \ \ \

* 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).