aboutsummaryrefslogtreecommitdiff
path: root/tests/test-coverage-core--intersect.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-23 19:14:29 -0500
committerCraig Jennings <c@cjennings.net>2026-05-23 19:14:29 -0500
commite839a3ae87a11f6a7ee191e6840ac05c6b00454b (patch)
treef7c99e330fd015819606a289a94fbc41534f0376 /tests/test-coverage-core--intersect.el
parent1de680d903752e178cf6894a1a97fefb1c845738 (diff)
downloaddotemacs-e839a3ae87a11f6a7ee191e6840ac05c6b00454b.tar.gz
dotemacs-e839a3ae87a11f6a7ee191e6840ac05c6b00454b.zip
fix(dwim-shell): delete password temp file after the process exits
The four password commands (PDF protect/unprotect, remove-zip-encryption, create-encrypted-zip) wrote the password to a temp file, launched an async dwim-shell command, then deleted the file in unwind-protect. Since the command is async, that delete ran the instant it launched, so qpdf or 7z could start after the password file was already gone. I extracted cj/dwim-shell--run-with-password-file and cj/dwim-shell--password-cleanup-callback. The temp file (mode 600) is now deleted from an :on-completion callback that fires after the process exits, on both success and failure, and the synchronous unwind-protect stays only as a backstop for a throw before the async launch. All four commands now go through the one helper. qpdf already reads the password via --password-file, so it stays out of the argv. 7z still takes it as -p"$(cat ...)", which lands on its command line. That's tracked as a separate follow-up.
Diffstat (limited to 'tests/test-coverage-core--intersect.el')
0 files changed, 0 insertions, 0 deletions