Re: [Alt. PATCH v5] gc: save log from daemonized gc --auto and print it next time
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 21, 2015, 16:19 UTC
- Message-ID
- <xmqqy4fzbv90.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1442639665-25692-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
Show 7 quoted lines
> The lock-based version has an advantage that the following gc runs > will never see partial gc.log. But it requires some more hook at > atexit() and maybe signal handler. > > This version avoids that, and gc.log can be kept even if gc is > SIGKILL'd (unlikely because gc itself does not do anything that can > upset the kernel), but then it's racy.
Given that you are only interested in an non-empty output, and also you want to avoid running an auto-gc when another one is already running, I wonder if that "never see partial" property really matters.
In any case, "an alternative could be to avoid lockfile and not bothering to remove an empty one" was idea from Michael, so let's CC him back in the loop.
> I think I perfer the lock-based version.
It certainly does look more familiar to me, too ;-)