The posix-umask program
posix-umask changes its file mode creation mask, then executes a program.
posix-umask [ -S ] [ mask ] [ prog... ]
When called with no argument, posix-umask prints the value of the
file mode creation mask of the invoking process, then exits 0.
When called with a mask argument, posix-umask changes
its file mode creation mask; then, if prog... is not empty, it execs
posix-umask interprets mask as specified by the
specification for a umask external utility.
- When execline has been configured
with the --enable-pedantic-posix option, the umask
command is a symbolic link to it. So scripts calling umask
will use posix-umask. When this configuration option has not
been given, umask is a symbolic link to
- posix-umask fully conforms to the
specification. When prog... is not empty, the behaviour of a
umask utility is not specified by POSIX, so posix-umask extends
the spec to be actually useful and usable in an execline program with the same
interface as the regular execline umask command.
- Nobody ever executes or needs the external version (i.e. not a shell
builtin) of the POSIX umask command. Compared to execline's regular umask
binary, execline-umask, posix-umask is
uselessly bloated and slow. The only reason it exists is that some
distributions refuse to package execline correctly unless it is strictly
POSIX-compliant; the --enable-pedantic-posix configure option is
there to satisfy their requirements.