mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-08 12:01:21 +02:00
45302: bin_umask(): Queue signals around umask().
Otherwise, a signal handler might create files while the temporary umask is in effect.
This commit is contained in:
parent
610b4b3028
commit
faa476a4ed
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2020-01-15 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* 45302: Src/builtin.c: bin_umask(): Queue signals around
|
||||
umask().
|
||||
|
||||
2020-01-14 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* users/24656: Doc/Zsh/mod_zutil.yo: docs: Add an example of
|
||||
|
|
|
@ -7287,8 +7287,11 @@ bin_umask(char *nam, char **args, Options ops, UNUSED(int func))
|
|||
char *s = *args;
|
||||
|
||||
/* Get the current umask. */
|
||||
um = umask(0);
|
||||
queue_signals();
|
||||
um = umask(0777);
|
||||
umask(um);
|
||||
unqueue_signals();
|
||||
|
||||
/* No arguments means to display the current setting. */
|
||||
if (!s) {
|
||||
if (OPT_ISSET(ops,'S')) {
|
||||
|
|
Loading…
Reference in a new issue