The shell umask is a call to umask() to set the process mask, which is inherited, like signals, environment and fd (but they may be close-on-exec), and is not stored within the shell programs's allocated variables.
The open man page says:
The argument mode specifies the permissions to use in case a new file is created. It is modified by the process's umask in the usual way: the permissions of the created file are (mode & ~umask). Note that this mode only applies to future accesses of the newly created file; the open() call that creates a read-only file may well return a read/write file descriptor.