unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

UMASK(2V)                                                            UMASK(2V)



NAME
       umask - set file creation mode mask

SYNOPSIS
       #include <&lt;sys/stat.h>&gt;

       int umask(mask)
       int mask;

SYSTEM V SYNOPSIS
       #include <&lt;sys/types.h>&gt;
       #include <&lt;sys/stat.h>&gt;

       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)



                                21 January 1990                      UMASK(2V)