Core.stdc.signal.signal() requires that a signal handler function is "nothrow @nogc @system". These attributes impose quite a limitation - one cannot even print which signal was accepted. While if one imports this same function via "extern (C)" path, he can freely throw and allocate memory in the signal handler. And this actually makes sense, as the handler function is called on top of the stack of where the code was running when the signal popped in, so it's like calling a function.
Why the limitation if it works ?

Reply via email to