RE: incompatible open modes

From: Richard B. Johnson (root_at_chaos.analogic.com)
Date: 07/31/03

  • Next message: William Stearns: "Re: Follow-up: Linux, Dell Access Point, and the GPL."
    Date:	Thu, 31 Jul 2003 15:14:37 -0400 (EDT)
    To: "Ata, John" <John.Ata@DigitalNet.com>
    
    

    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,
    *** 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/


  • Next message: William Stearns: "Re: Follow-up: Linux, Dell Access Point, and the GPL."