about summary refs log tree commit diff
path: root/src/unistd
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-08-10 23:39:43 -0400
committerRich Felker <dalias@aerifal.cx>2013-08-10 23:39:43 -0400
commit7c440977db9444d7e6b1c3dcb1fdf4ee49ca4158 (patch)
tree7d4156fff86dfa1d75dba61465baad792088dc2b /src/unistd
parent41c632824c08ac2c9eea43b30d1b3515dd910df6 (diff)
downloadmusl-7c440977db9444d7e6b1c3dcb1fdf4ee49ca4158.tar.gz
musl-7c440977db9444d7e6b1c3dcb1fdf4ee49ca4158.tar.xz
musl-7c440977db9444d7e6b1c3dcb1fdf4ee49ca4158.zip
fix _NSIG and SIGRTMAX on mips
a mips signal mask contains 128 bits, enough for signals 1 through
128. however, the exit status obtained from the wait-family functions
only has room for values up to 127. reportedly signal 128 was causing
kernelspace bugs, so it was removed from the kernel recently; even
without that issue, however, it was impossible to support it correctly
in userspace.

at the same time, the bug was masked on musl by SIGRTMAX incorrectly
yielding 64 on mips, rather than the "correct" value of 128. now that
the _NSIG issue is fixed, SIGRTMAX can be fixed at the same time,
exposing the full range of signals for application use.

note that the (nonstandardized) libc _NSIG value is actually one
greater than the max signal number, and also one greater than the
kernel headers' idea of _NSIG. this is the reason for the discrepency
with the recent kernel changes. since reducing _NSIG by one brought it
down from 129 to 128, rather than from 128 to 127, _NSIG/8, used
widely in the musl sources, is unchanged.
Diffstat (limited to 'src/unistd')
0 files changed, 0 insertions, 0 deletions