If mlock() fails with errno EAGAIN, it should be retried up to five times, which is tracked in the retries variable. However, the return false statement after the switch case makes the function return false after the first failed mlock() call.
Remove this statement to actually retry up to five times.
If mlock() fails with errno EAGAIN, it should be retried up to five times, which is tracked in the retries variable. However, the
return false
statement after the switch case makes the function return false after the first failed mlock() call.Remove this statement to actually retry up to five times.