Il 06/06/2014 10:27, Riku Voipio ha scritto:
Hi,

On Wed, Jun 04, 2014 at 09:49:00AM +0200, Natanael Copa wrote:
The __SIGRTMIN and __SIGRTMAX are glibc internals and are not available
on all platforms, so we define those if they are missing. We also check
that those corresponds with the posix variables SIGRTMIN/SIGRTMAX which
may only be available during runtime.

This is needed for musl libc.

After all, the idea of asserts doesn't work on glibc it seems:

qemu-arm qemu-smoke/armel/busybox ls -ld .
qemu-arm: linux-user/signal.c:393: signal_init: Assertion `32 == 
(__libc_current_sigrtmin ())' failed.
Aborted

Quick test on my amd64/glibc 2.18 system:

printf("RTMIN: %d RTMAX: %d\n", SIGRTMIN, SIGRTMAX);
RTMIN: 34 RTMAX: 64

While: /usr/include/bits/signum.h
#define __SIGRTMIN  32

That's because glibc reserves two signals (one for cancellation, the other to implement set*id system calls). Basically you'd need to extend the hack of host_to_target_signal_table to all signals in the [__SIGRTMIN, SIGRTMIN) range, computing the table at run-time.

Paolo


Reply via email to