1333 High kernel cpu usage & dtrace hang on idle system
[illumos-gate.git] / usr / src / man / man2 / umask.2
blob1976cbab9505b18ebd5685da4a1e8b93824a99d8
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 1997, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH UMASK 2 "Dec 28, 1996"
7 .SH NAME
8 umask \- set and get file creation mask
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/types.h>
13 #include <sys/stat.h>
15 \fBmode_t\fR \fBumask\fR(\fBmode_t\fR \fIcmask\fR);
16 .fi
18 .SH DESCRIPTION
19 .sp
20 .LP
21 The \fBumask()\fR function sets the  process's file mode creation mask to
22 \fIcmask\fR and returns the previous value of the mask. Only the access
23 permission bits of \fIcmask\fR and the file mode creation mask are used. The
24 mask is inherited by child processes. See \fBIntro\fR(2) for more information
25 on masks.
26 .SH RETURN VALUES
27 .sp
28 .LP
29 The previous value of the file mode creation mask is returned.
30 .SH ATTRIBUTES
31 .sp
32 .LP
33 See \fBattributes\fR(5) for descriptions of the following attributes:
34 .sp
36 .sp
37 .TS
38 box;
39 c | c
40 l | l .
41 ATTRIBUTE TYPE  ATTRIBUTE VALUE
43 Interface Stability     Standard
45 MT-Level        Async-Signal-Safe
46 .TE
48 .SH SEE ALSO
49 .sp
50 .LP
51 \fBmkdir\fR(1), \fBsh\fR(1), \fBIntro\fR(2), \fBchmod\fR(2), \fBcreat\fR(2),
52 \fBmknod\fR(2), \fBopen\fR(2), \fBstat.h\fR(3HEAD), \fBattributes\fR(5),
53 \fBstandards\fR(5)