Hi. On Thu, Sep 10, 2026 at 12:22:42PM -0400, Jeff King wrote: > We have a temporary-file cleanup handler that we install already, which > handles signal propagation, atomicity, etc. It seems like it would be > simpler to just use that. That sounds like even a better idiom to achieve the goal. > > In the worst case we can just call register_tempfile() on each path, but > I think this code could be taught to use the actual creation. Something > like the patch below (only lightly tested). I've tested it and it works (cleans up both after SIGINT and regular termination). (There's only a warning about constness, one should not change the tempfile's path buffer. But here the ovewrite happens only if there were trialing dirseps, which they aren't as the filename is under control.) Do you want me to send your variant as v2 or will you? Thanks, Michal