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

Re: [PATCH v3 1/2] builtin/maintenance: fix locking with "--detach"

From
Junio C Hamano <gitster@pobox.com>
Date
May 13, 2026, 10:06 UTC
Message-ID
<xmqqy0hnipy4.fsf@gitster.g>
In-Reply-To
<20260513-pks-maintenance-fix-lock-with-detach-v3-1-f27a1ac82891@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
> Note that this is a broader fix, as we now always reassign tempfiles
> when daemonizing. This is a natural consequence of the semantics of
> `daemonize()` though, as it essentially promises to continue running the
> current process in the background.

Exactly. I do agree that it is the right wy to look at it. The process that daemonise creates and leaves in the background is logically the process that continues to execute the service the process the user started, and unless the original process explicitly says "we are done serving this thing" and cleans up tempfile or lockfile it needed to serve that thing, it is natural to make the surviving process to take over the responsibility.

Previous: Patrick SteinhardtNext: Taylor Blau
Message 11 of 18 in “builtin/maintenance: fix locking and respect "gc.auto"”
  1. 0/2 builtin/maintenance: fix locking and respect "gc.auto"Patrick Steinhardt, May 11, 2026
  2. 1/2 builtin/maintenance: fix locking with "--detach"Patrick Steinhardt, May 11, 2026
  3. Junio C HamanoMay 12, 2026
  4. Patrick SteinhardtMay 12, 2026
  5. 2/2 run-command: honor "gc.auto" for auto-maintenancePatrick Steinhardt, May 11, 2026
  6. Jeff KingMay 11, 2026
  7. Junio C HamanoMay 12, 2026
  8. Patrick SteinhardtMay 12, 2026
  9. 0/2 builtin/maintenance: fix locking and respect "gc.auto"Patrick Steinhardt, May 13, 2026
  10. 1/2 builtin/maintenance: fix locking with "--detach"Patrick Steinhardt, May 13, 2026
  11. Junio C HamanoMay 13, 2026
  12. Taylor BlauMay 20, 2026
  13. Jeff KingMay 20, 2026
  14. Patrick SteinhardtMay 20, 2026
  15. 2/2 run-command: honor "gc.auto" for auto-maintenancePatrick Steinhardt, May 13, 2026
  16. Patrick SteinhardtMay 21, 2026
  17. Junio C HamanoMay 21, 2026
  18. Patrick SteinhardtMay 21, 2026

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.