'\"macro stdmacro
.if n .pH g2.umask @(#)umask	40.17 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} umask 2 "" "\&"
.if \nX=1 .ds x} umask 2 ""
.if \nX=2 .ds x} umask 2 "" "\&"
.if \nX=3 .ds x} umask "" "" "\&"
.TH \*(x}
.SH NAME
\f4umask\f1 \- set and get file creation mask
.SH SYNOPSIS
\f4#include <sys/types.h>\f1
.br
\f4#include <sys/stat.h>\f1
.PP
\f4mode_t umask(mode_t cmask);\f1
.SH DESCRIPTION
\f4umask\f1
sets the 
process's file mode creation mask to
\f2cmask\f1
and returns the previous value of the mask.
Only the access permission bits of
\f2cmask\f1
and the file mode creation mask are used.
.SH SEE ALSO
\f4chmod\f1(2), \f4creat\f1(2), \f4mknod\f1(2), \f4open\f1(2), \f4stat\f1(5).
.sp .2
\f4mkdir\f1(1), \f4sh\f1(1)
in the
\f2User's Reference Manual\f1.
.SH "DIAGNOSTICS"
The previous value of the file mode creation mask is returned.
.\"	@(#)umask.2	6.2 of 9/6/83
.Ee
