core: Handle slow pam verification (#157)

* Handle slow pam verification

For example when using systemd-homed with fido auth

* fix code style
This commit is contained in:
Abi Hafshin Alfarouq 2024-03-09 23:46:22 +07:00 committed by GitHub
parent 8086d896e6
commit 160fe3553f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -371,6 +371,9 @@ void CHyprlock::run() {
int ret = poll(pollfds, 1, 5000 /* 5 seconds, reasonable. Just in case we need to terminate and the signal fails */); int ret = poll(pollfds, 1, 5000 /* 5 seconds, reasonable. Just in case we need to terminate and the signal fails */);
if (ret < 0) { if (ret < 0) {
if (errno == EINTR)
continue;
Debug::log(CRIT, "[core] Polling fds failed with {}", errno); Debug::log(CRIT, "[core] Polling fds failed with {}", errno);
attemptRestoreOnDeath(); attemptRestoreOnDeath();
m_bTerminate = true; m_bTerminate = true;