| GETUMASK(2) | System Calls Manual | GETUMASK(2) |
getumask — get
file creation mode mask
#include
<sys/stat.h>
mode_t
getumask(void);
The
getumask()
routine returns the process's file mode creation mask.
Configuration of the file creation mode mask is
achieved through the
umask()
system call.
The default mask value is S_IWGRP | S_IWOTH (022, write access for the owner only). Child processes inherit the mask of the calling process.
The value of the file mode mask is returned by the call.
The getumask() function is always
successful.
#include
<sys/types.h> #include
<sys/stat.h>
The include file
<sys/types.h> is
necessary.
The getumask() system call appeared in OS
X 27.0.
| June 1, 2025 | macOS 26 |