* fileio.c (Fdefault_file_modes): Block input while fiddling with umask.

Otherwise, the umask might be mistakenly 0 while handling input signals.
This commit is contained in:
Paul Eggert 2012-06-20 14:20:06 -07:00
parent 297a8f1ddb
commit f10deafb12
2 changed files with 7 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
* fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
Otherwise, the umask might be mistakenly 0 while handling input signals.
2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuf.c (Fread_string): Bind minibuffer-completion-table.

View file

@ -3014,8 +3014,10 @@ The value is an integer. */)
int realmask;
Lisp_Object value;
BLOCK_INPUT;
realmask = umask (0);
umask (realmask);
UNBLOCK_INPUT;
XSETINT (value, (~ realmask) & 0777);
return value;