Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ umask(2) — Ultrix-11 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mkdir(1)

chmod(2)

creat(2)

mknod(2)

open(2)

umask(2)

NAME

umask − set file creation mode mask

SYNTAX

int umask(complmode)
int complmode;

DESCRIPTION

The umask system call sets a mask used whenever a file is created by a creat or mknod call.  The actual mode of the newly-created file is the logical “and” of the given mode and the complement of the argument.  For further information, see chmod(2).  Only the low-order 9 bits of the mask (the protection bits) participate.  In other words, the mask shows the bits to be turned off when files are created. 

RETURN VALUE

If successful, returns the previous value of the mask.  The value is initially 0 (no restrictions).  The mask is inherited by child processes. 

ASSEMBLER

(umask = 60.) 
sys umask; complmode

SEE ALSO

mkdir(1), chmod(2), creat(2), mknod(2), open(2)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026