POSIX-UMASK(1)

NAME
posix-umask - change file mode creation mask, then execute a program

SYNOPSIS
posix-umask [-S] [mask] [prog...]

DESCRIPTION
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 exec(3) s into it.

posix-umask interprets mask as specified by the POSIX specification for a ‘umask’ external utility[1].

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 execline-umask(1).

posix-umask fully conforms to the POSIX specification[1]. 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(1), 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.

SEE ALSO
emptyenv(1), envfile(1), exec(1), execline-cd(1), execline-umask(1), exit(1), export(1), fdblock(1), fdclose(1), fdmove(1), fdreserve(1), fdswap(1), getcwd(1), getpid(1), heredoc(1), piperw(1), posix-cd(1), redirfd(1), trap(1), tryexec(1), unexport(1), wait(1), withstdinas(1)

[1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/umask.html

This man page is ported from the authoritative documentation at: https://skarnet.org/software/execline/posix-umask.html

AUTHORS
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)