.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\" %sccs.include.redist.man%
.\" @(#)umask.2 8.1 (Berkeley) %G%
.Nd set file creation mode mask
.Fd #include <sys/stat.h>
.Fn umask "mode_t numask"
routine sets the process's file mode creation mask to
and returns the previous value of the mask. The 9 low-order
are used by system calls, including
to turn off corresponding bits
This clearing allows each user to restrict the default access
The default mask value is S_IWGRP|S_IWOTH (022, write access for the
Child processes inherit the mask of the calling process.
The previous value of the file mode mask is returned by the call.
function is always successful.
function call is expected to conform to IEEE Std 1003.1-1988