#include <sys/types.h> #include <sys/stat.h> mode_t umask( mode_t cmask );
The umask()
function sets the process file creation mask to cmask
.
The file creation mask is used during open()
, creat()
, mkdir()
,
mkfifo()
calls to turn off permission bits in the mode
argument.
Bit positions that are set in cmask
are cleared in the mode of the
created file.
NONE
The cmask
argument should have only permission bits set. All other
bits should be zero.
In a system which supports multiple processes, the file creation mask is inherited
across fork()
and exec()
calls. This makes it possible to alter the
default permission bits of created files. RTEMS does not support multiple processes
so this behavior is not possible.
Copyright © 1988-2007OAR Corporation