1GETUMASK(3) Linux Programmer's Manual GETUMASK(3)
2
3
4
6 getumask - get file creation mask
7
9 #define _GNU_SOURCE /* See feature_test_macros(7) */
10 #include <sys/types.h>
11 #include <sys/stat.h>
12
13 mode_t getumask(void);
14
16 This function returns the current file creation mask. It is equivalent
17 to
18
19 mode_t getumask(void)
20 {
21 mode_t mask = umask( 0 );
22 umask(mask);
23 return mask;
24 }
25
26 except that it is documented to be thread-safe (that is, shares a lock
27 with the umask(2) library call).
28
30 This is a vaporware GNU extension.
31
33 This function is documented in the glibc manual, but, as at glibc ver‐
34 sion 2.24, it is not implemented on Linux. (See umask(2) for a thread-
35 safe method of discovering a process's umask.)
36
38 umask(2)
39
41 This page is part of release 5.02 of the Linux man-pages project. A
42 description of the project, information about reporting bugs, and the
43 latest version of this page, can be found at
44 https://www.kernel.org/doc/man-pages/.
45
46
47
48GNU 2017-09-15 GETUMASK(3)