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 7, 2016, 19:00 UTC
Message-ID
<20160907190004.dw3p6fxkdaubwuvu@sigill.intra.peff.net>
In-Reply-To
<xmqq4m5rmu4i.fsf@gitster.mtv.corp.google.com>
On Wed, Sep 07, 2016 at 11:39:57AM -0700, Junio C Hamano wrote:
> > 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.
> 
> Is fifo safe on Windows, though?

No clue. We seem to use mkfifo unconditionally in lib-daemon, but perhaps people do not run that test on Windows. Other invocations seem to be protected by the PIPE prerequisite. But...

> With v2 that explicitly kills, I guess we can make the sleep longer
> without slowing down in the optimistic case?

Yeah, I think the v2 one is non-racy (I thought at first we might race with the "echo", but it should be synchronous; the hook will not exit until we have written the pid file, and git will not exit until the hook is done running).

I agree that the sleep could be made longer, to make the test less racy. However, the racy failure mode is that it might pass while testing nothing (i.e., the sleep ends anyway before the hook returns), so I don't think it's a high priority.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 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.