Skip to content

Commit

Permalink
Fix RestartableSequence::Available
Browse files Browse the repository at this point in the history
- Consider EPERM as rseq not available
  • Loading branch information
harikrishnan94 committed Oct 26, 2021
1 parent 69dd3f1 commit 6e4a9e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rseq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit 6e4a9e9

Please sign in to comment.