Re: [TopGit PATCH/RFC] Do not use mktemp

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

 



Hi,

Petr Baudis wrote:

> On Tue, Aug 12, 2008 at 01:14:27PM -0500, Jonathan Nieder wrote:
> > Old operating systems may not even have mktemp; less old
> > operating systems may have a mktemp which is not compatible with
> > the usual post-1.5 version.  Let's try to do without.
> 
>   can you give some concrete examples?

SunOS 5.8 has no mktemp (which is not so bad, because as you say, we
could provide our own stub).

Mac OS X mktemp does not allow omitting the template argument but
otherwise shouldn't be much of a problem.  On Mac OS X (and old BSDs,
too, presumably), "mktemp -t arg" treats arg as a prefix for a filename
rather than a template for a filename, but that is just a cosmetic
problem.

So thinking it through, perhaps we should do the following:
 - provide a simple mini-mktemp for users install to install themselves
   on old systems
 - always provide the template argument to mktemp

The arcane umask use would then go in that mini-mktemp which most people
would not be using.  I still would appreciate suggestions from any shell
hackers on how to implement it properly (in particular, how to get
random numbers that change more than once/second).

I'll work on a patch in a few hours when I get home.  Thanks for the
comments.

Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux