RTEMS Logo

RTEMS 4.7.99.2 On-Line Library


Files and Directories Manager umask - Sets a file creation mask.

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

4.4.12: umask - Sets a file creation mask.

CALLING SEQUENCE:

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

mode_t umask(
  mode_t cmask
);

STATUS CODES:

DESCRIPTION:

The umask() function sets the process file creation mask to cmask. The file creation mask is used during open(), creat(), mkdir(), mkfifo() calls to turn off permission bits in the mode argument. Bit positions that are set in cmask are cleared in the mode of the created file.

NOTES:

NONE

The cmask argument should have only permission bits set. All other bits should be zero.

In a system which supports multiple processes, the file creation mask is inherited across fork() and exec() calls. This makes it possible to alter the default permission bits of created files. RTEMS does not support multiple processes so this behavior is not possible.


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2004 OAR Corporation