lwp: Fix handling of sigismember() failure
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 27 Dec 2020 07:18:27 +0000 (08:18 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 17 Jan 2021 20:24:28 +0000 (21:24 +0100)
commit7481482656bba3d4217fc36182645a088dd763fb
tree19b05e621a13ae148742fc97f0ef69e6be6661d8
parent5315db952d1b5ae4fd86c6ffd3e17de77e890025
lwp: Fix handling of sigismember() failure

sigismember() fails when passed an invalid or unsupported signal
number.  lwpInitSigWait() and lwpGetSig() treat sigismember() failure
like "is a member".  lwpInitSigWait() will then sigaction()
unsuccessfully.  Harmless.  lwpGetSig() returns the bad signal number
when it's greater than any caught signal's number.  The bad signal
number then gets returned to main(), which shuts down the server.

Fix by treating failure like "is not a member".

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/lwp/sig.c