]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Added mkdir(2) to discussion, made term "file mode creation mask" clearer.
authorMichael Kerrisk <mtk.manpages@gmail.com>
Thu, 30 Jun 2005 08:07:33 +0000 (08:07 +0000)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Thu, 30 Jun 2005 08:07:33 +0000 (08:07 +0000)
Various, mostly small, wording changes

man2/umask.2

index a01f18a3b3fd1c07932935230d22b8360dc79ad9..7148ef6bf896a7f55e509316f8ad81373ca41b9e 100644 (file)
@@ -29,7 +29,7 @@
 .\"  <nick@debian.com> with Lars Wirzenius <liw@iki.fi> suggestion
 .TH UMASK 2 1998-08-09 "Linux" "Linux Programmer's Manual"
 .SH NAME
-umask \- set file creation mask
+umask \- set file mode creation mask
 .SH SYNOPSIS
 .B #include <sys/types.h>
 .br
@@ -37,25 +37,34 @@ umask \- set file creation mask
 .sp
 .BI "mode_t umask(mode_t " mask );
 .SH DESCRIPTION
-.B umask
-sets the umask to 
+.BR umask ()
+sets the calling process's file mode creation mask (umask) to 
 .I mask 
 & 0777.
 
 The umask is used by
-.BR open (2)
-to set initial file permissions on a newly-created file.
+.BR open (2),
+.BR mkdir (2),
+and other system calls that create files
+.\" e.g., mkfifo(), creat(), mknod(), sem_open(), mq_open(), shm_open()
+.\" but NOT the System V IPC *get() calls
+to modify the permissions placed on newly created files or directories.
 Specifically, permissions in the umask are turned off from
 the \fBmode\fR argument to
 .BR open (2)
+and
+.BR mkdir (2)
 (so, for example, the common umask default value of 022 results in new
 files being created with permissions 0666 & ~022 = 0644 = rw-r--r--
-in the usual case where the \fBmode\fR is specified as 0666).
+in the usual case where the \fBmode\fR is specified to
+.BR open (2)
+as 0666).
 .SH "RETURN VALUE"
 This system call always succeeds and the previous value of the mask
 is returned.
 .SH "CONFORMING TO"
 SVr4, SVID, POSIX, X/OPEN, BSD 4.3
 .SH "SEE ALSO"
-.BR creat (2),
+.BR chmod (2),
+.BR mkdir (2),
 .BR open (2)