mode_t umask(mode_t mask);
This syscall sets the umask of the calling process to the passed mask AND’d
with 777
in octal.
The umask is used by the kernel when creating files in the name of the calling
process. It marks permissions to be turned off from mode
arguments
passed by the user. The default value is 22
in octal, and is inherited
from parent processes to children.
This syscall never fails, it always returns the old mask before modification.