Grrr…
the #POSIX signal API is such a b0rked clusterfuck
The people who came up with this half baked mess are responsible for thousands (if not millions) of years of human suffering.
It could have been so simple: When registering a handler, also pass a user pointer, and handlers are registered in a list and can be removed from the list at any time.
But noooo… let's make it an API where some n-th degree dependency can completely fuck up signal handling for the whole process.