On Sat Apr 26 12:56:06 2014, jhi wrote: > Use safe umask (0600) before mkstemp. Modern glibcs use a safe umask, > but older ones don't, and on non-glibc systems better play safe. > > Attached. While I think the patch is good, threaded code that uses C<< open my $fh, "+>", undef >> might see some intermittent unexpected permissions on files created in other threads. Unfortunately umask() updates the mask for the whole process and there's no thread-local variant, so I don't see a thread-safe solution. Added to the 5.21.1 list. Tony --- via perlbug: queue: perl5 status: new https://rt.perl.org/Ticket/Display.html?id=121742