[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: igc, macOS avoiding signals
From: |
Helmut Eller |
Subject: |
Re: igc, macOS avoiding signals |
Date: |
Thu, 02 Jan 2025 11:00:50 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
On Thu, Jan 02 2025, Eli Zaretskii wrote:
> The problem is that evidently (at least on Posix platforms), if a
> program that uses MPS runs application code from a SIGPROF or a
> SIGALRM or a SIGCHLD signal handler can trigger a recursive access to
> the MPS arena, which causes a fatal signal if that happens while MPS
> holds the arena lock. So we want to ask for a callback when MPS is
> about to lock the arena, and another callback immediately after it
> releases the lock. With that, we could defer the application code of
> these signal handlers until after the arena is free to be accessed
> again.
The functions to change would most likely be AreaEnter and ArenaLeave.
As alternative to callbacks, we could give the Arena a signal mask.
Arenas can be created with the function mps_arena_create_k. This
accepts keyword arguments. So the callbacks or signal mask could be
given with a new keyword argument.
Helmut