|
116 | 116 | \label{OPEN}
|
117 | 117 |
|
118 | 118 | \begin{itemize}
|
119 |
| -\item The first available file descriptor is always used. |
| 119 | +\item The first available file descriptor is always used. |
120 | 120 | \item When \texttt{O\_CREAT} is used, the \emph{mode} is modified using the
|
121 |
| -current mask that can be changed via a shell command \texttt{umask} -- those |
122 |
| -bits in \emph{mode}, also set in the process umask, are nullified. The |
123 |
| -default umask value is typically (and historically) \texttt{022}. We recommend |
124 |
| -that you always set it to \texttt{077} in your profile script. Never do that for |
125 |
| -root though otherwise you may end up with a system in a non-supported |
126 |
| -configuration -- installed software may not be possible to run by |
127 |
| -non-privileged users, what worked before may stop working, etc. |
| 121 | +current mask that can be changed using the \texttt{umask} system call |
| 122 | +(the \texttt{umask} shell command is a wrapper of this system call) |
| 123 | +-- those bits in \emph{mode}, that are also set in the process umask, |
| 124 | +are nullified. |
| 125 | +The default umask value is typically (and historically) \texttt{022}. |
| 126 | +We recommend that you always set it to \texttt{077} in your profile script. |
| 127 | +Never do that for root though otherwise you may end up with a system in |
| 128 | +a non-supported configuration -- installed software may not be possible to run |
| 129 | +by non-privileged users, what worked before may stop working, etc. |
128 | 130 | \item If the \emph{mode} argument is required and not specified, you get
|
129 | 131 | whatever is presently on the stack or in the CPU register used to pass the
|
130 | 132 | argument. Both flags and mode are stored in the system file table, see page
|
|
0 commit comments