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