Eric Blake wrote: > Suppose the user is perverse > enough (usually, only when trying to hammer out corner cases just like > this ;) to run with a umask of 702 (ie. they want group but not user > privileges). As written, the current code creates an unusable directory. > Either we must document that a program that uses the clean-temp module > must change umask, call create_temp_dir, and restore the umask, or we > change mkdtemp to do that on our behalf.
mkdtemp is in glibc, and is documented: "The directory is created using mode `0700'." If it doesn't do so, due to the umask, you can file a bug for glibc. > But M4 currently uses the > close-stream module which Paul and Jim maintain, and I am not sure whether > they will be using your proposed patch to use fwriterror instead of fpending. You are free to add a close_stream_temp function to the create-temp module if you protect it with #ifdef so that it doesn't introduce a module dependency. Bruno