UMASK(2-POSIX) RISC/os Reference Manual UMASK(2-POSIX)
NAME
umask - set and get file creation mask
SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
modet umask (cmask)
modet cmask;
DESCRIPTION
umask sets the process's file mode creation mask to cmask
and returns the previous value of the mask. Only the file
permission bits (see <sys/stat.h>) of cmask are used; the
rest are discarded.
The process' file mode creation mask is used during open,
creat, mkdir, and mkfifo calls to turn off permision bits in
the mode argument supplied. Bit positions that are set in
cmask are cleared in the mode of the created file.
SEE ALSO
chmod(2), creat(2), mkfifo(2), mkdir(2), open(2).
mkdir(1), sh(1) in the User's Reference Manual.
DIAGNOSTICS
The previous value of the file mode creation mask is
returned.
Printed 1/15/91 Page 1