ke, 2006-06-14 kello 02:28 -0400, Joey Hess kirjoitti: > Fraid the use of mkstemp, besides having the permissions portability > problems documented on its man page, means that all files this version > of sponge touches come out mode 600.
Oh, yeah, I forgot to fix that. Bummer. Doing a chmod & umask for a new file after the file is opened should be correct; not sure what to do if the file already existed before sponge was run (copy from temporary file?). mkstemp seems to be the best function for the job, though, that is, the one that can create a named temporary file securely. Unless I've missed a function for that? I'm not fond of the original solution of keeping everything in memory, since that is going to hurt when the input is large relative to memory size. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]