Re: [PATCH v4 8/8] progress.c: add & assert a "global_progress" variable
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Oct 25, 2021, 11:53 UTC
- Message-ID
- <c65c0a54-b66f-a043-01d9-192f9ca1efde@kdbg.org>
- In-Reply-To
- <patch-v4-8.8-06124e8ac5e-20211025T111915Z-avarab@gmail.com>
Am 25.10.21 um 13:25 schrieb Ævar Arnfjörð Bjarmason:
Show 5 quoted lines
> Once we have a > global current progress object we'll be able to update that object via > SIGALRM, this will cover cases where we're busy, but either haven't > invoked our first display_progress() yet, or the time between > display_progress() is too long. See [3] for early code to do that.
This can't be a goal. You cannot do serious stuff in a signal handler. Don't proliferate complicated signal handlers.
On top of that, our SIGALRM handler on Windows runs in its own thread and can't do more than set a volatile sigatomic_t (and even that is undefined behavior, strictly speaking).
-- Hannes