On Fri May 23 05:40:37 2025 +0000, Alexander Shaikhulin wrote:
As far as I understand it, libc's sigaction is normally being redirected to __thr_sigaction, which wraps every signal handler, that [wrapper](https://github.com/freebsd/freebsd-src/blob/3c3dd62966123b424657983d9a4d173f...) relies on TLS. Thus it's too late to set fsbase in init_handler. (Also FreeBSD will do leave_handler's job itself, no need to worry about that one.) This is still a bit obnoxious and we are actually discussing getting rid of that particular annoyance on the FreeBSD side. Would take some time, though.
Are these wrappers needed for our case? Couldn't you install the handlers directly with the kernel?