swaywm / swaylock

Screen locker for Wayland
MIT License
853 stars 202 forks source link

Fix retry behaviour in while loop with mlock() #326

Closed Maaxxs closed 1 year ago

Maaxxs commented 1 year ago

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.