···26262727 linux_signum = signum_bsd_to_linux(signum);
2828 if (linux_signum == 0)
2929- return -EINVAL;
2929+ {
3030+ // Some software (e.g. Node.js) tries to set up handlers for all signals by
3131+ // walking through all signal numbers incrementally. They end up hitting
3232+ // signals that don't exist on Linux and then bail out if they receive
3333+ // an error.
3434+ // Fake that everyting is all right.
3535+3636+ if (osa != NULL)
3737+ memset(osa, 0, sizeof(*osa));
3838+3939+ return 0;
4040+ }
30413142 if (nsa != NULL)
3243 {