Kernel: Implement sigsuspend using a SignalBlocker

`sigsuspend` was previously implemented using a poll on an empty set of
file descriptors. However, this broke quite a few assumptions in
`SelectBlocker`, as it verifies at least one file descriptor to be
ready after waking up and as it relies on being notified by the file
descriptor.

A bare-bones `sigsuspend` may also be implemented by relying on any of
the `sigwait` functions, but as `sigsuspend` features several (currently
unimplemented) restrictions on how returns work, it is a syscall on its
own.
This commit is contained in:
Tim Schumacher 2022-05-13 13:15:45 +02:00 committed by Brian Gianforcaro
commit cf0ad3715e
Notes: sideshowbarker 2024-07-17 09:35:21 +09:00
4 changed files with 28 additions and 1 deletions

View file

@ -170,6 +170,7 @@ enum class NeedsBigProcessLock {
S(sigpending, NeedsBigProcessLock::Yes) \
S(sigprocmask, NeedsBigProcessLock::Yes) \
S(sigreturn, NeedsBigProcessLock::Yes) \
S(sigsuspend, NeedsBigProcessLock::Yes) \
S(sigtimedwait, NeedsBigProcessLock::Yes) \
S(socket, NeedsBigProcessLock::Yes) \
S(socketpair, NeedsBigProcessLock::Yes) \