is there a better way of doing this?
You might store the current/previous umask (as returned by umask), and set it back when done... (in case you're doing other things later in the same proccess where you want the default umask to apply).
(BTW, your default umask likely was 0022 (not 0222), otherwise you'd have gotten 0444.)
In reply to Re: umask with 0666
by almut
in thread umask with 0666
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |