Thanks for your attention. > Is the rest of this API thread safe, and no longer is because of this? > You're doing this because... * The `gettext()` and `fputs()` which calls in `die_errno(_())` are seem highly unlikely async-signal-safety, this may cause problems in signal handlers, I should remove it. * This is thread-safe. The *.rev file will no longer be read/written after creating the signal handler by `sigchain_push_common()`. * On the other hand, the command: `git multi-pack-index write --bitmap` will create an lockfile named `multi-pack-index.lock` and the signal handler will not affect the execution of the same command or git-process. The purpose of this patch is the same as what Teng Long said, to clean up the files generated by the process when the process exits abnormally. Thanks.