summaryrefslogtreecommitdiff
path: root/lib-src/test-distrib.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-07-14 19:56:17 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2013-07-14 19:56:17 -0700
commitbafe80ce49206c61bea74b0c70080bfdc97785d1 (patch)
tree22253f5fabd4df1513fe28e403280cf5d4e98e28 /lib-src/test-distrib.c
parent0463c1ef26bf2d3dc3ea8a3de20e4446c1a55e64 (diff)
downloademacs-bafe80ce49206c61bea74b0c70080bfdc97785d1.tar.gz
emacs-bafe80ce49206c61bea74b0c70080bfdc97785d1.tar.bz2
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 'lib-src/test-distrib.c')
0 files changed, 0 insertions, 0 deletions