File:  [Research Unix] / researchv10dc / man / adm / man2 / umask.2
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

.TH UMASK 2
.CT 2 file_inq_creat
.SH NAME
umask \(mi set file creation mode mask
.SH SYNOPSIS
.B int umask(complmode)
.SH DESCRIPTION
.I Umask
sets the process mode mask.
The mask modifies the
.I mode
argument of
.IR creat
(see
.IR open (2)),
.IR mkdir (2),
and
.IR mknod (2)
thus:
.L
       mode &= (07777 & ~(complmode & 0777))
.br
In other words, the mask specifies permission bits to be turned off
when files are created.
.PP
The previous value of the mask is returned by the call.
The initial value is set by
.IR login (8),
and may be modified by the
.I umask
command of
.IR sh (1).
The mask is inherited by child processes.
.SH SEE ALSO
.IR open (2),
.IR mkdir (2), 
.IR mknod (2), 
.IR stat (2)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.