[klibc] [PATCH] fix non-RT sigsuspend()
tg at mirbsd.de
Mon May 14 15:46:54 PDT 2012
H. Peter Anvin dixit:
>As you might have noticed, klibc configuration use #if, not #ifdef, with
>the defaults *and documentation* defined in <klibc/sysconfig.h>. I have
>to admit to finding this maze completely opaque.
There's five different styles – int/long return value, just one
argument, int+u_long+sigset_t, int+int+sigset_t, so #if made less
sense, but I can change that if you want. Basically, only one is
>OK, so the real question becomes: can we just switch all the
>architectures to rt instead?
Not as long as we use kernel headers. Took me hours to debug it,
but in the essence, sizeof(sigset_t) is 4 with the kernel headers
in userspace on i386, whereas that is old_sigset_t in the kernel,
and rt_sigsuspend expects the kernel's idea of sigset_t, which is
larger, and throws -EINVAL in all other cases.
On the other hand: all architectures have rt, not all have the
old syscall… so it does sound like the best option. I’m not skilled
enough with Linux kernel headers and development to figure out how
to best proceed with that, though. Sorry.
“Having a smoking section in a restaurant is like having
a peeing section in a swimming pool.”
-- Edward Burr
More information about the klibc