Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

From: Stephen Rothwell
Date: Wed Apr 13 2016 - 19:09:47 EST


Hi Richard,

On Wed, 13 Apr 2016 20:05:33 +0100 "Richard W.M. Jones" <rjones@xxxxxxxxxx> wrote:
>
> 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 was wondering if you really need to read the umask, or would just a
"ignore umask" flag to open{,at} do what you want?

--
Cheers,
Stephen Rothwell