No trap cleanup on mktemp — temp files leak on Ctrl+C #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
mktempis called inollama-brain.sh(6x) andvectors/15-file-upload.sh(1x) without anytrapcleanup.If the user hits Ctrl+C mid-run, temp files accumulate in /tmp/.
Fix: Add
trap 'rm -f "$sys_file" "$usr_file"' EXIT INT TERMafter each mktemp call.Files: