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

Re: [PATCH] t6026-merge-attr: wait for process to release trash directory

From
Jeff King <peff@peff.net>
Date
Sep 6, 2016, 07:27 UTC
Message-ID
<20160906072707.goysliw32xgwmlol@sigill.intra.peff.net>
In-Reply-To
<3fd38b71-26bd-bdb3-fe5c-e7038abf51e0@kdbg.org>
On Mon, Sep 05, 2016 at 09:03:48PM +0200, Johannes Sixt wrote:
Show 5 quoted lines
> The process spawned in the hook uses the test's trash directory as CWD.
> As long as it is alive, the directory cannot be removed on Windows.
> Although the test succeeds, the 'test_done' that follows produces an
> error message and leaves the trash directory around. Insert a delay to
> give the hook time to go away.

Ugh. I'd love it if we could avoid inserting a sleep, which wastes time in the optimistic case and is insufficient in the pessimistic one.

The fact that the hook is already using sleep is even nastier, as it that's a potential race on a loaded system.

Can we do some signaling with fifos to tell the hook when it is safe to exit? Then we would just need to `wait` for its parent process.

-Peff
Previous: Johannes SchindelinNext: Junio C Hamano
Message 5 of 11 in “t6026-merge-attr: wait for process to release trash directory”
  1. t6026-merge-attr: wait for process to release trash directoryJohannes Sixt, Sep 5, 2016
  2. Johannes SchindelinSep 6, 2016
  3. t6026-merge-attr: clean up background process at end of test caseJohannes Sixt, Sep 7, 2016
  4. Johannes SchindelinSep 7, 2016
  5. Jeff KingSep 6, 2016
  6. Junio C HamanoSep 7, 2016
  7. Jeff KingSep 7, 2016
  8. Junio C HamanoSep 7, 2016
  9. Johannes SchindelinSep 8, 2016
  10. Jeff KingSep 8, 2016
  11. Johannes SchindelinSep 9, 2016

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.