On Wed, Apr 13, 2016 at 09:01:25PM +0000, Mathieu Desnoyers wrote:
I'm actually discussing 3 separate things here: the umask, sigmask, and
cpu affinity mask.
The last two are available in /proc/<pid>/status --- which brings up
the question why not just add umask to /proc/<pid>/status?
That way the shared library can read it via /proc/self/status, but
this way it would be possible to look at other process's umask values
this as well.
quoted
quoted
Another approach to this has been attempted before, adding something
to /proc, although it didn't go anywhere. See:
http://comments.gmane.org/gmane.linux.kernel/1292109
... and indeed that's what I suggested. It looks like from the thread
that it petered out due to apathy instead of people not liking the
idea.
One other reason to suggest using a /proc file is that you're not at
the mercy of the glibc folks to wire up a new system call. (Glibc has
been refusing to wire up getrandom(2), for example. Grrrr.....)
- Ted