all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: nobrowser@gmail.com
Subject: Re: temporary file name, with a twist
Date: 8 Sep 2006 06:24:45 -0700	[thread overview]
Message-ID: <1157721885.311979.282450@p79g2000cwp.googlegroups.com> (raw)
In-Reply-To: v97j0ezvll.fsf@marauder.physik.uni-ulm.de

Reiner Steib wrote:
> On Fri, Sep 08 2006, nobrowser@gmail.com wrote:
>
> > Reiner Steib wrote:
> >> On Thu, Sep 07 2006, nobrowser@gmail.com wrote:
> >>
> >> > in my lisp code, I need to get a unique temporary file name, but
> >> > _with a specific suffix_.
> >>
> >> `make-temp-file' or `make-temp-name'?
> >>
> >
> > Nope, that's what I started with.  Doesn't do the suffix part.
>
> In addition to David's comment, I'd say it's not exactly hard to
> append a suffix when using `make-temp-name'; at least easier than
> creating maildir-like[1] names.

At the slight risk of further insulting a deceased equine, let me
explain:

either way, with make-temp-name or with handcrafted names, I have,
theoretically, the classic tmpnam(3) race condition.  The difference is
that with my own, I control the algorithm so I can be confident that
the race won't actually happen in practice.  I don't have that
confidence with the Emacs names, which for all I know are generated
with tmpnam.  The doc says only that "The Emacs process number forms
part of the result".  But how unique are they actually, what's the
length of the cycle?

Thanks,
i

      reply	other threads:[~2006-09-08 13:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-07 15:31 temporary file name, with a twist nobrowser
2006-09-07 16:20 ` Miles Bader
     [not found] ` <mailman.6588.1157646012.9609.help-gnu-emacs@gnu.org>
2006-09-07 16:33   ` nobrowser
2006-09-07 18:16 ` Reiner Steib
2006-09-08  5:52   ` nobrowser
2006-09-08  6:30     ` David Kastrup
2006-09-08  7:05     ` Reiner Steib
2006-09-08 13:24       ` nobrowser [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1157721885.311979.282450@p79g2000cwp.googlegroups.com \
    --to=nobrowser@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.