[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Locking temporary files?
From: |
Eli Zaretskii |
Subject: |
Locking temporary files? |
Date: |
Sun, 04 Aug 2013 19:05:48 +0300 |
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 "address@hidden: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?
- Locking temporary files?,
Eli Zaretskii <=