OSDN Git Service

LDP: Update original to LDP v3.68
[linuxjm/LDP_man-pages.git] / original / man3 / getumask.3
1 .\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl>
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" This replaces an earlier man page written by Walter Harms
26 .\" <walter.harms@informatik.uni-oldenburg.de>.
27 .\"
28 .TH GETUMASK 3 2010-09-10 "GNU" "Linux Programmer's Manual"
29 .SH NAME
30 getumask \- get file creation mask
31 .SH SYNOPSIS
32 .BR "#define _GNU_SOURCE" "             /* See feature_test_macros(7) */"
33 .br
34 .B "#include <sys/types.h>"
35 .br
36 .B "#include <sys/stat.h>"
37 .sp
38 .B "mode_t getumask(void);"
39 .SH DESCRIPTION
40 This function returns the current file creation mask.
41 It is equivalent to
42 .in +4n
43 .nf
44
45 mode_t getumask(void)
46 {
47     mode_t mask = umask( 0 );
48     umask(mask);
49     return mask;
50 }
51
52 .fi
53 .in
54 except that it is documented to be thread-safe (that is, shares
55 a lock with the
56 .BR umask (2)
57 library call).
58 .SH CONFORMING TO
59 This is a vaporware GNU extension.
60 .SH NOTES
61 This function is documented but not implemented yet in glibc,
62 as at version 2.9.
63 .SH SEE ALSO
64 .BR umask (2)
65 .SH COLOPHON
66 This page is part of release 3.68 of the Linux
67 .I man-pages
68 project.
69 A description of the project,
70 information about reporting bugs,
71 and the latest version of this page,
72 can be found at
73 \%http://www.kernel.org/doc/man\-pages/.