[PATCH 3/3] platform: fix missing sigisemptyset

Rich Felker dalias at aerifal.cx
Wed Nov 27 21:24:09 UTC 2013


On Wed, Nov 27, 2013 at 03:21:08PM +0100, Denys Vlasenko wrote:
> On Wed, Nov 27, 2013 at 2:46 AM, Rich Felker <dalias at aerifal.cx> wrote:
> > On Tue, Nov 26, 2013 at 10:01:36PM +0200, Daniel Borca wrote:
> >> +#ifndef HAVE_SIGISEMPTYSET
> >> +int sigisemptyset(sigset_t *set)
> >> +{
> >> +     sigset_t empty;
> >> +     int ret = sigemptyset(&empty);
> >> +     if (ret == 0) {
> >> +             ret = !memcmp(&empty, set, sizeof(sigset_t));
> >> +     }
> >> +     return ret;
> >> +}
> >> +#endif
> >
> > This is not a suitable fallback implementation. It's not needed on
> > musl (we provide sigisemptyset), but if this version were used, it
> > would give the wrong results, because musl's sigemptyset only fills
> > the first _NSIG-1 bits and ignores the remaining ~900 bits of junk in
> > sigset_t.
> 
> Why does musl use such pointlessly huge sigset_t?

Because it provides near-full ABI-compatibility with glibc-linked
binaries to the extent that even the binaryware Flash player works,
and the binaryware nvidia drivers are either working or
close-to-working. I agree it's ugly and unfortunate that we inherited
this HURD nonsense from glibc, though.

Rich


More information about the busybox mailing list