This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: other/2141: set -C in gccbug not portable


On Mon, 12 Mar 2001, Rainer Orth wrote:

> How about using a different approach: creating a unique temporary directory
> and storing the gccbug temp files there?  This shouldn't be vulnerable to
> temp races and doesn't rely on non-portable options either.

It's also more prone to DoS attacks than the mktemp method, so mktemp is
still preferable on systems that have it.

I presume that any systems on which mkdir fails to return a proper exit
status (non-zero if the directory already exists) or follows symlinks also
lack set -C?

-- 
Joseph S. Myers
jsm28@cam.ac.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]