all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: emacs-devel@gnu.org
Subject: Locking temporary files?
Date: Sun, 04 Aug 2013 19:05:48 +0300	[thread overview]
Message-ID: <8361vlxwyr.fsf@gnu.org> (raw)

I discovered that when we invoke call-process-region, we lock the
temporary file used as input for the sub-process.  The lock happens
inside write-region.  Here's the relevant portion of a backtrace
showing the call sequence:

  #0  mkostemp (
      template=0x82aa00 "c:/DOCUME~1/USERNAME/LOCALS~1/Temp/.#-emacsXXXXXX",
      flags=32896) at w32.c:3448
  #1  0x01110deb in create_lock_file (
      lfname=0x82cb50 "c:/DOCUME~1/USERNAME/LOCALS~1/Temp/.#ema02336",
      lock_info_str=0x82aae0 "eliz@HOME-C4E4A596F7.1840:1375370886",
      force=false) at filelock.c:417
  #2  0x01111027 in lock_file_1 (
      lfname=0x82cb50 "c:/DOCUME~1/USERNAME/LOCALS~1/Temp/.#ema02336",
      force=false) at filelock.c:482
  #3  0x01111598 in lock_if_free (clasher=0x82cbe0,
      lfname=0x82cb50 "c:/DOCUME~1/USERNAME/LOCALS~1/Temp/.#ema02336")
      at filelock.c:636
  #4  0x01111813 in lock_file (fn=270669553) at filelock.c:720
  #5  0x01127532 in Fwrite_region (start=4, end=3424, filename=270669553,
      append=53446682, visit=53501050, lockname=270669553, mustbenew=53446682)
      at fileio.c:4875
  #6  0x011cba54 in create_temp_file (nargs=8, args=0x82f584) at callproc.c:1062
  #7  0x011cbb30 in Fcall_process_region (nargs=8, args=0x82f584)
      at callproc.c:1119

Locking temporary files sounds redundant, doesn't it?



             reply	other threads:[~2013-08-04 16:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-04 16:05 Eli Zaretskii [this message]
2013-08-04 16:58 ` Locking temporary files? Paul Eggert

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=8361vlxwyr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.