[libc-commits] [libc] [libc][signal] clean up usage of sighandler_t (PR #125745)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Tue Feb 4 14:50:34 PST 2025
nickdesaulniers wrote:
Regardless, looking at the usage of `__sighandler_t` in asm-generic/signal-defs.h, I suspect that the libc is expected to provide the typedef to the kernel uapi header (which seems ass-backwards to me, but perhaps there's a good reason I'm unfamiliar with). (Also, perhaps I should just send a kernel patch to just use `void (*member)(int);` then in 100 years we can depend on it).
So I worry about a (hypothetical, perhaps contrived) case where: a user of llvm-libc somehow manages to `#include <asm-generic/signal.h>` before include llvm-libc's `<signal.h>` such that `__sighandler_t` is not defined. Because the kernel headers themselves do not define `__sighandler_t`, that results in a compilation failure since there is no definition of `__sighandler_t`. Is that possible? Or something else I'm misssing?
https://github.com/llvm/llvm-project/pull/125745
More information about the libc-commits
mailing list