summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/signal.cpp
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-12-12 01:02:08 +0200
committerIdan Horowitz <idan.horowitz@gmail.com>2021-12-12 08:34:19 +0200
commit640844c96510004295816a18ce4319c376ec715a (patch)
tree4f7d92741bf7d074d2ab06bd3552d6a757f97247 /Userland/Libraries/LibC/signal.cpp
parent762e047ec9c4d1dad7c8f72099fa59f1fdf0ab50 (diff)
downloadserenity-640844c96510004295816a18ce4319c376ec715a.zip
LibC: Implement sigwaitinfo()
This is implemented as a simple wrapper around sigtimedwait()
Diffstat (limited to 'Userland/Libraries/LibC/signal.cpp')
-rw-r--r--Userland/Libraries/LibC/signal.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/signal.cpp b/Userland/Libraries/LibC/signal.cpp
index 20561ed6f0..929935abdb 100644
--- a/Userland/Libraries/LibC/signal.cpp
+++ b/Userland/Libraries/LibC/signal.cpp
@@ -163,6 +163,12 @@ int sigsuspend(const sigset_t* set)
return pselect(0, nullptr, nullptr, nullptr, nullptr, set);
}
+// https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigwaitinfo.html
+int sigwaitinfo(sigset_t const* set, siginfo_t* info)
+{
+ return sigtimedwait(set, info, nullptr);
+}
+
int sigtimedwait(sigset_t const* set, siginfo_t* info, struct timespec const* timeout)
{
int rc = syscall(Syscall::SC_sigtimedwait, set, info, timeout);