aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorPaul Eggert2013-07-14 19:56:17 -0700
committerPaul Eggert2013-07-14 19:56:17 -0700
commitbafe80ce49206c61bea74b0c70080bfdc97785d1 (patch)
tree22253f5fabd4df1513fe28e403280cf5d4e98e28 /src/ChangeLog
parent0463c1ef26bf2d3dc3ea8a3de20e4446c1a55e64 (diff)
downloademacs-bafe80ce49206c61bea74b0c70080bfdc97785d1.tar.gz
emacs-bafe80ce49206c61bea74b0c70080bfdc97785d1.zip
* callproc.c (Fcall_process_region): Fix minor race and tune.
(create_temp_file): New function, with the temp-file-creation part of the old Fcall_process_region. Use Fcopy_sequence to create the temp file name, rather than alloca + build_string, for simplicity. Don't bother to block input around the temp file creation; shouldn't be needed. Simplify use of mktemp. Use record_unwind_protect immediately after creating the temp file; this closes an unlikely race where the temp file was not removed. Use memcpy rather than an open-coded loop. (Fcall_process_region): Use the new function. If the input is empty, redirect from /dev/null rather than from a newly created empty temp file; this avoids unnecessary file system traffic.
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 329fa6ba670..cd6d188b686 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,18 @@
12013-07-15 Paul Eggert <eggert@cs.ucla.edu>
2
3 * callproc.c (Fcall_process_region): Fix minor race and tune.
4 (create_temp_file): New function, with the temp-file-creation part
5 of the old Fcall_process_region. Use Fcopy_sequence to create the
6 temp file name, rather than alloca + build_string, for simplicity.
7 Don't bother to block input around the temp file creation;
8 shouldn't be needed. Simplify use of mktemp. Use
9 record_unwind_protect immediately after creating the temp file;
10 this closes an unlikely race where the temp file was not removed.
11 Use memcpy rather than an open-coded loop.
12 (Fcall_process_region): Use the new function. If the input is
13 empty, redirect from /dev/null rather than from a newly created
14 empty temp file; this avoids unnecessary file system traffic.
15
12013-07-14 Paul Eggert <eggert@cs.ucla.edu> 162013-07-14 Paul Eggert <eggert@cs.ucla.edu>
2 17
3 * filelock.c (create_lock_file) [!HAVE_MKOSTEMP && !HAVE_MKSTEMP]: 18 * filelock.c (create_lock_file) [!HAVE_MKOSTEMP && !HAVE_MKSTEMP]: