From 6e4a9e956f333f8a6ab07e3a92dcf2aa6ce3a471 Mon Sep 17 00:00:00 2001 From: Harikrishnan Date: Tue, 26 Oct 2021 11:40:17 +0530 Subject: [PATCH] Fix RestartableSequence::Available - Consider EPERM as rseq not available --- src/rseq.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rseq.cpp b/src/rseq.cpp index 0867d0f..87b289d 100644 --- a/src/rseq.cpp +++ b/src/rseq.cpp @@ -35,11 +35,12 @@ auto RestartableSequence::Available() noexcept -> bool switch (errno) { case ENOSYS: + case EPERM: return false; case EINVAL: return true; default: - std::fprintf(stderr, "rseq syscall returns unexpected error.\n"); // NOLINT + std::perror("rseq"); abort(); } }