Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(2V)

mknod(2V)

open(2V)

UMASK(2V)  —  SYSTEM CALLS

NAME

umask − set file creation mode mask

SYNOPSIS

#include <sys/stat.h>

int umask(mask)
int mask;

SYSTEM V SYNOPSIS

#include <sys/types.h>
#include <sys/stat.h>

mode_t umask(mask)
mode_t mask;

DESCRIPTION

umask() sets the process’s file creation mask to mask and returns the previous value of the mask.  The low-order 9 bits of mask are used whenever a file is created, clearing corresponding bits in the file access permissions.  (see stat(2V)).  This clearing restricts the default access to a file. 

The mask is inherited by child processes. 

RETURN VALUES

umask() returns the previous value of the file creation mask. 

SEE ALSO

chmod(2V), mknod(2V), open(2V)

Sun Release 4.1  —  Last change: 21 January 1990

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