Commit | Line | Data |
---|---|---|
e6817382 BJ |
1 | .TH UMASK 2 |
2 | .SH NAME | |
3 | umask \- set file creation mode mask | |
4 | .SH SYNOPSIS | |
5 | .B umask(complmode) | |
6 | .SH DESCRIPTION | |
7 | .I Umask | |
8 | sets a mask used whenever a file is created by | |
9 | .IR creat (2) | |
10 | or | |
11 | .IR mknod (2): | |
12 | the actual mode (see | |
13 | .IR chmod (2)) | |
14 | of the newly-created file is the logical | |
15 | .B and | |
16 | of the given mode and the complement of the argument. | |
17 | Only the low-order 9 bits of the mask (the protection bits) | |
18 | participate. | |
19 | In other words, the mask shows the bits to be turned off | |
20 | when files are created. | |
21 | .PP | |
22 | The previous value of the mask is returned by the call. | |
23 | The value is initially 0 (no restrictions). | |
24 | The mask is inherited by child processes. | |
25 | .SH SEE ALSO | |
26 | creat(2), mknod(2), chmod(2) | |
27 | .SH "ASSEMBLER (PDP-11)" | |
28 | (umask = 60.) | |
29 | .br | |
30 | .B sys umask; complmode |