umask

Sets the file permission mask (part of the thread group context)

Local Servers:blocking
Remote Servers:N/A
Platform:NLM
Service:File System

Syntax

   #include <stat.h>  
    
   int umask  (  
      int   permission);
   

Parameters

permission

(IN) Specifies the file permission mask to be used to update the permission of the current process.

Return Values

Returns the previous value of the permission parmeter.

Remarks

The file permission mask is used to modify the permission setting of new files created by the creat, open, or sopen function. If a bit in the mask is on, the corresponding bit in the requested permission value for the file is disallowed.

The permission parameter is a constant expression involving the constants S_IREAD and S_IWRITE as defined in SYS\STAT.H.

S_IWRITE

Write permission

S_IREAD

Read permission

See Also

chmod, creat, open, sopen (Single and Intra-File Services)