Date: Fri, 12 Jan 1996 18:43:55 -0800 From: Josh MacDonald <jmacd@cs.berkeley.edu> To: Terry Lambert <terry@lambert.org> Cc: jmacd@cs.berkeley.edu (Josh MacDonald), nate@sri.mt.net, freebsd-hackers@freebsd.org, jmacd@paris.CS.Berkeley.EDU Subject: Re: mktemp() sucks, why not fix it? Message-ID: <199601130243.SAA08722@paris.CS.Berkeley.EDU> In-Reply-To: Your message of "Fri, 12 Jan 1996 14:35:25 MST." <199601122135.OAA20866@phaeton.artisoft.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > > > > > Sorry, that my strings were not writable misses the point. > > That was my contrived example to illustrate the real problem, > > which is not addressed by what you wrote. > > > > Say that I malloced those segments and reread my message, that > > wasn't the problem. I was calling mktemp on heap allocated > > memory segments in my program when I stumbled upon this problem. > > mktemp() creates a file name. > > mktemp() does not create a file. > > mktemp() will "uniquify" the file name between calls only if the > file exists (from the error returns in the man page, you can see > it stats the target). > > > Probably you want to use the tmpfile() interface instead of > reimplementing its functionality anyway. > > > > Terry Lambert > terry@lambert.org > --- > Any opinions in this posting are my own and not those of my present > or previous employers. Except I need to make symlinks as well as real files, depending on certain conditions. Directories as well.. I have modified the source and am including it in my program. -josh
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601130243.SAA08722>