diff --git a/Userland/Libraries/LibCore/System.cpp b/Userland/Libraries/LibCore/System.cpp index 63e6e7f790a..c67823144a5 100644 --- a/Userland/Libraries/LibCore/System.cpp +++ b/Userland/Libraries/LibCore/System.cpp @@ -1771,10 +1771,14 @@ ErrorOr readlink(StringView pathname) ErrorOr poll(Span poll_fds, int timeout) { + for (auto& poll_fd : poll_fds) + poll_fd.revents = 0; + auto const rc = ::poll(poll_fds.data(), poll_fds.size(), timeout); if (rc < 0) return Error::from_syscall("poll"sv, -errno); - return { rc }; + + return rc; } #ifdef AK_OS_SERENITY