.\" @(#)umask.2v 1.25 90/02/15 SMI; from UCB 12 Feb 1983 .TH UMASK 2V "21 January 1990" .SH NAME umask \- set file creation mode mask .SH SYNOPSIS .LP .nf .ft B #include .ft .fi .LP .nf .ft B int umask(mask) int mask; .ft .fi .SH SYSTEM V SYNOPSIS .LP .nf .ft B #include #include .ft .fi .LP .nf .ft B mode_t umask(mask) mode_t mask; .ft .fi .IX umask() "" "\fLumask()\fP \(em set user mask" .IX "file system" umask() "" \fLumask()\fP .IX set "file creation mode mask \(em \fLumask()\fR" .IX set "user mask \(em \fLumask()\fR" .IX "user mask, set \(em \fLumask()\fR" .SH DESCRIPTION .LP .B umask(\|) sets the process's file creation mask to .I mask and returns the previous value of the mask. The low-order 9 bits of .I mask are used whenever a file is created, clearing corresponding bits in the file access permissions. (see .BR stat (2V)). This clearing restricts the default access to a file. .LP The mask is inherited by child processes. .SH RETURN VALUES .LP .B umask(\|) returns the previous value of the file creation mask. .SH SEE ALSO .BR chmod (2V), .BR mknod (2V), .BR open (2V)