lkml.org 
[lkml]   [2003]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: incompatible open modes
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!"

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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.032 / U:1.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site