* Locking temporary files?
@ 2013-08-04 16:05 Eli Zaretskii
2013-08-04 16:58 ` Paul Eggert
0 siblings, 1 reply; 2+ messages in thread
From: Eli Zaretskii @ 2013-08-04 16:05 UTC (permalink / raw)
To: emacs-devel
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-04 16:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-04 16:05 Locking temporary files? Eli Zaretskii
2013-08-04 16:58 ` Paul Eggert
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).