You can attach gdb to a running process and then call umask in the debugger:
(gdb) call umask(0)
[Switching to Thread -1217489200 (LWP 11037)]
$1 = 18
(gdb) call umask(18)
$2 = 0
(gdb)
(note: 18 = O22)
This suggests that there may be a really ugly way to get the umask using ptrace.