source: trunk/minix/man/man2/umask.2@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1010 bytes
RevLine 
[9]1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\" @(#)umask.2 6.1 (Berkeley) 5/9/85
6.\"
7.TH UMASK 2 "May 9, 1985"
8.UC 4
9.SH NAME
10umask \- set file creation mode mask
11.SH SYNOPSIS
12.nf
13.ft B
14#include <sys/types.h>
15#include <sys/stat.h>
16
17mode_t umask(mode_t \fImask\fP)
18.ft R
19.fi
20.SH DESCRIPTION
21.B Umask
22sets the process's file mode creation mask to \fImask\fP
23and returns the previous value of the mask. The low-order
249 bits of \fImask\fP are used whenever a file is created,
25clearing corresponding bits in the file mode
26(see
27.BR chmod (2)).
28This clearing allows each user to restrict the default access
29to his files.
30.PP
31The value is initially 022 (write access for owner only).
32The mask is inherited by child processes.
33.SH "RETURN VALUE
34The previous value of the file mode mask is returned by the call.
35.SH SEE ALSO
36.BR chmod (2),
37.BR mknod (2),
38.BR open (2).
Note: See TracBrowser for help on using the repository browser.