Use gdb to find the umask of a running process.
gdb program-name pid
For example:
~ # gdb nginx 21155 [...] (gdb) call umask(0) $1 = 18 (gdb) call umask(18) $2 = 0 (gdb) quit
The first call sets the umask to 0000, and outputs the previous umask value in decimal. The second call restores the original umask.
Convert the decimal 18 to octal 0022, and there you have it.