On 04/13/16 12:05, Richard W.M. Jones wrote:
v3 -> v4:

  - Rename the syscall: getumask becomes umask2.

  - Add flags parameter, with one flag (UMASK_GET_MASK).

  - Expand the rationale for this change in the first commit message.


It's not possible to read the process umask without also modifying it,
which is what umask(2) does.  A library cannot read umask safely,
especially if the main program might be multithreaded.


I wouldn't say "if"; that is the case when it matters.

I have to say I'm skeptic to the need for umask2() as opposed to getumask(). I would also like to be able to get the umask of another process, which would argue for adding it to /proc anyway.

        -hpa

Reply via email to