open problem - Linux

This is a discussion on open problem - Linux ; Does it make sense to create a file using ``open" without the mode argument?...

+ Reply to Thread
Results 1 to 3 of 3

Thread: open problem

  1. open problem

    Does it make sense to create a file using ``open" without the mode argument?

  2. Re: open problem

    Ronald writes:

    > Does it make sense to create a file using ``open" without the mode argument?


    No. If you do, the open() function will take some random value from
    the stack or a register and use it for the mode.

    --
    Måns Rullgård
    mru@inprovide.com

  3. Re: open problem

    Måns Rullgård wrote:

    > Ronald writes:
    >
    >> Does it make sense to create a file using ``open" without the mode
    >> argument?

    >
    > No. If you do, the open() function will take some random value from
    > the stack or a register and use it for the mode.
    >

    from the man page:
    mode must be specified when O_CREAT is in the flags, and is ignored
    otherwise.
    Eric



+ Reply to Thread