Re: [PATCH] t6500: don't run detached auto gc at the end of the test script
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Apr 12, 2017, 00:27 UTC
- Message-ID
- <CAM0VKjmuCjLBFAErXP06wu0+-7SdWVMaVu_g25Q4V-uQz8T1uA@mail.gmail.com>
- In-Reply-To
- <426f08b9-79c8-0c5b-e07e-4dd6a49243e9@kdbg.org>
On Tue, Apr 11, 2017 at 11:32 PM, Johannes Sixt <j6t@kdbg.org> wrote:
Show 15 quoted lines
> Am 10.04.2017 um 19:01 schrieb Jeff King:
>>
>> I wonder if you could make it a general test-lib function, like:
>>
>> run_and_wait () {
>> # we read stdout from the child only for the side effect
>> # of waiting until all child sub-processes exit, closing their
>> # fd 9.
>> does_not_matter=$("$@" 9>&1)
>
>
> I'm afraid this won't work on Windows when the invoked command is git. FD
> inheritance between MSYS (bash) and non-MSYS programs (git) is only
> implemented for FDs 0,1,2. That's a deficiency of MSYS, and I don't think
> that was improved in MSYS2.Oh, that's a pity, I was almost ready with v2...
Unfortunately, this makes the general helper function unworkable, of course. Though in this particular case it wouldn't matter, because on Windows daemonize() is basically a noop and 'git gc --auto' remains in the foreground anyway.
I think we should stick with my initial patch, then.