git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH] midx.c: clean up .rev file

From
XXXiaowen Xia <haoyurenzhuxia@gmail.com>
Date
Jun 27, 2022, 03:53 UTC
Message-ID
<CAHLXgnYeR_Mwp3A31_q-T_cWw75F1jFAKrVsvm8R04Z-VaWz3A@mail.gmail.com>
In-Reply-To
<220622.86a6a4lmdv.gmgdl@evledraar.gmail.com>
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.
Previous: Teng Long
Message 9 of 9 in “midx.c: clean up .rev file”
  1. midx.c: clean up .rev filehaoyurenzhuxia@gmail.com, Jun 22, 2022
  2. Ævar Arnfjörð BjarmasonJun 22, 2022
  3. Junio C HamanoJun 22, 2022
  4. Taylor BlauJun 22, 2022
  5. Junio C HamanoJun 22, 2022
  6. Taylor BlauJun 22, 2022
  7. Xiaowen XiaJun 27, 2022
  8. Teng LongJun 23, 2022
  9. Xiaowen XiaJun 27, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.