X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/9bccf70c0258c7cac2dcb80011b2a964d884c552..6d2010ae8f7a6078e10b361c6962983bab233e0f:/bsd/man/man2/umask.2 diff --git a/bsd/man/man2/umask.2 b/bsd/man/man2/umask.2 index 92eff34f7..a9e156109 100644 --- a/bsd/man/man2/umask.2 +++ b/bsd/man/man2/umask.2 @@ -40,23 +40,23 @@ .Nm umask .Nd set file creation mode mask .Sh SYNOPSIS -.Fd #include .Fd #include .Ft mode_t -.Fn umask "mode_t numask" +.Fo umask +.Fa "mode_t cmask" +.Fc .Sh DESCRIPTION The .Fn umask routine sets the process's file mode creation mask to -.Fa numask -and returns the previous value of the mask. The 9 low-order -access permission -bits of -.Fa numask +.Fa cmask +and returns the previous value of the mask. +The 9 low-order access permission bits of +.Fa cmask are used by system calls, including .Xr open 2 , .Xr mkdir 2 , -.Xr mkfifo 2 +.Xr mkfifo 2 , and .Xr mknod 2 to turn off corresponding bits @@ -66,7 +66,7 @@ requested in file mode. This clearing allows each user to restrict the default access to his files. .Pp -The default mask value is S_IWGRP|S_IWOTH (022, write access for the +The default mask value is S_IWGRP | S_IWOTH (022, write access for the owner only). Child processes inherit the mask of the calling process. .Sh RETURN VALUES @@ -75,12 +75,20 @@ The previous value of the file mode mask is returned by the call. The .Fn umask function is always successful. +.Sh LEGACY SYNOPSIS +.Fd #include +.Fd #include +.Pp +The include file +.In sys/types.h +is necessary. .Sh SEE ALSO .Xr chmod 2 , .Xr mkdir 2 , .Xr mkfifo 2 , .Xr mknod 2 , -.Xr open 2 +.Xr open 2 , +.Xr compat 5 .Sh STANDARDS The .Fn umask