umask.2
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 2 代码 · 共 49 行
2
49 行
.\" SCCSID: @(#)umask.2 8.1 9/11/90.TH umask 2.SH Nameumask \- set file creation mask.SH Syntax.B #include <sys/types.h>.br.B #include <sys/stat.h>.PP.B oumask = umask(\fInumask\fP).br.B mode_t oumask, \fInumask\fP;.fi.SH Description.NXR "umask system call".NXR "file" "setting mode mask"The.PN umasksystem callsets the process's file mode creation mask to .PN numaskand returns the previous value of the mask. The low-ordernine bits of .PN numaskare used whenever a file is created,clearing corresponding bits in the file mode.(For further information, see .MS chmod 2 .)This clearing allows each user to restrict the default accessto his or her files..PPThe value is initially 022 (write access for owner only).The mask is inherited by child processes..PPThe previous value of the file mode mask is returned by the call..SH Environment.PPPOSIX.brWhen your program is compiled in POSIX mode,the.I numaskargument is of type mode_t and the.PN umaskfunctionreturns a value of type mode_t..SH See Alsochmod(2), mknod(2), open(2)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?