[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: proposal: per-user temporary directories on by default?



On Fri, 25 Jul 2003 23:11:04 -0400, Matt Zimmerman wrote:

> On Fri, Jul 25, 2003 at 07:33:25PM -0600, Dwayne C. Litzenberger wrote:
> 
>> <rant>
>> Personally, I'd rather see a better set of tools for programmers to use
>> to create temporary files.  tmpfile(3) is horribly inadequade for a lot
>> of things (like when you need to know the filename of the file you just
>> created)
> 
> mkstemp(3)

Just by the by: mkstemp(3) is inadequate for some cases, such as creating
temporary files to pass to gcc.  mkstemp changes the final characters of
the filename, but the file extension is important to gcc (and other
programs).  Sometimes you need /tmp/tmp12345.i.

I mention this just as an example where developers with the best of
intentions have no choice but to use a nonstandard method to create files.
Certainly this can be done safely, but to return to my original
point: it's good if there is additional protection beyond hoping that
every program is correct.

-- 
Martin



Reply to: