mirror of https://github.com/mkerrisk/man-pages
open.2: Say a bit more about what happens when 'mode' is wrongly omitted
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
88f463a9be
commit
901c8ecf7c
26
man2/open.2
26
man2/open.2
|
@ -289,20 +289,28 @@ mount options described in
|
|||
.IP
|
||||
The
|
||||
.I mode
|
||||
argument specifies the file mode bits be applied when a new file is created.
|
||||
This argument must be supplied when
|
||||
argument specifies the file mode bits to be applied when a new file is created.
|
||||
If neither
|
||||
.B O_CREAT
|
||||
nor
|
||||
.B O_TMPFILE
|
||||
is specified in
|
||||
.IR flags ,
|
||||
then
|
||||
.I mode
|
||||
is ignored (and can thus be specified as 0, or simply omitted).
|
||||
The
|
||||
.I mode
|
||||
argument
|
||||
.B must
|
||||
be supplied if
|
||||
.B O_CREAT
|
||||
or
|
||||
.B O_TMPFILE
|
||||
is specified in
|
||||
.IR flags ;
|
||||
if neither
|
||||
.B O_CREAT
|
||||
nor
|
||||
.B O_TMPFILE
|
||||
is specified, then
|
||||
.I mode
|
||||
is ignored.
|
||||
if it is not supplied,
|
||||
some arbitrary bytes from the stack will be applied as the file mode.
|
||||
.IP
|
||||
The effective mode is modified by the process's
|
||||
.I umask
|
||||
|
|
Loading…
Reference in New Issue