mktemp(1) in /tmp or $PWD?

Erik Trulsson ertr1013 at student.uu.se
Fri Feb 26 09:21:27 UTC 2010


On Thu, Feb 25, 2010 at 10:27:40PM -0800, Doug Barton wrote:
> On Thu, 25 Feb 2010, Garrett Cooper wrote:
> 
> > So what I did was I wrote up a patch to be *I know... here it comes*
> > more like GNU coreutils' copy of mktemp.
> 
> What's the motivation for this? I'm a little confused about why we'd 
> want to change this when the -t option already exists. Also, does POSIX 
> say anything about what the default should be?

POSIX does not define the mktemp(1) utility as far as I can tell, and
thus says nothing about the default.

The HISTORY section in the manpage says that mktemp(1) originated with
OpenBSD so if anything it is the OpenBSD implementation that ought to
be used as a reference.

If the GNU implementation behaves differently, then I would say it is
likely the GNU version which is wrong.


-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at student.uu.se


More information about the freebsd-hackers mailing list