umask(2)


umask -- set and get file creation mask

Synopsis

   #include <sys/types.h>
   #include <sys/stat.h>
   

mode_t umask(mode_t cmask);

Description

umask sets the process's file mode creation mask to cmask and returns the previous value of the mask. Only the access permission bits of cmask and the file mode creation mask are used.

Files

Message catalog: uxcore.abi

Return values

umask returns the previous value of the file mode creation mask.

References

chmod(2), creat(2), mkdir(1), mknod(2), open(2), sh(1), stat(5)

Notices

Considerations for threads programming

The file creation mask is an attribute of the containing process and is shared by sibling threads.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004