#include <sys/types.h> #include <sys/stat.h> mode_t cfg_umask( mode_t cmask );
The cfg_umask()
function sets the process node 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.
The file creation mask is inherited across fork()
and exec()
calls.
This makes it possible to alter the default permission bits of created files.
The cmask
argument should have only permission bits set. All other
bits should be zero.
Copyright © 1988-2004 OAR Corporation