From 8d3a62d67e69598430a1a6817e8f30f4cd33b0d4 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 9 Jan 2008 17:26:35 +0000 Subject: [PATCH] A few rewrites and additions. --- man2/umask.2 | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/man2/umask.2 b/man2/umask.2 index 35eaa7401..c6cd7bc1a 100644 --- a/man2/umask.2 +++ b/man2/umask.2 @@ -1,7 +1,8 @@ .\" Hey Emacs! This file is -*- nroff -*- source. .\" -.\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992 -.\" and Copyright (c) 2006, Michael Kerrisk (mtk.manpages@gmail.com) +.\" Copyright (c) 2006, 2008, Michael Kerrisk (mtk.manpages@gmail.com) +.\" (A few fragments remain from an earlier (1992) version written in +.\" 1992 by Drew Eckhardt .) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are @@ -29,7 +30,8 @@ .\" Modified Thu May 1 06:05:54 UTC 1997 by Nicolás Lichtmaier .\" with Lars Wirzenius suggestion .\" 2006-05-13, mtk, substantial rewrite of description of 'mask' -.TH UMASK 2 2006-05-13 "Linux" "Linux Programmer's Manual" +.\" 2008-01-09, mtk, a few rewrites and additions. +.TH UMASK 2 2008-01-09 "Linux" "Linux Programmer's Manual" .SH NAME umask \- set file mode creation mask .SH SYNOPSIS @@ -42,7 +44,9 @@ umask \- set file mode creation mask .BR umask () sets the calling process's file mode creation mask (umask) to .I mask -& 0777. +& 0777 (i.e., only the file permission bits of +.I mask +are used), and returns the previous value of the mask. The umask is used by .BR open (2), @@ -94,8 +98,24 @@ A child process created via inherits its parent's umask. The umask is left unchanged by .BR execve (2). + +The umask setting also affects the permissions assigned to POSIX IPC objects +.RB ( mq_open (3), +.BR sem_open (3), +.BR shm_open (3)), +FIFOs +.RB ( mkfifo (3)), +and Unix domain sockets +.RB ( unix (7)) +created by the process. +The umask does not affect the permissions assigned +to System V IPC objects created by the process (using +.BR msgget (2), +.BR semget (2), +.BR shmget (2)). .SH "SEE ALSO" .BR chmod (2), .BR mkdir (2), .BR open (2), .BR stat (2) +.\" FIXME . eventually: .BR acl (5)