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
1 changed files with 3 additions and 0 deletions

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 */);
if (ret < 0) {
if (errno == EINTR)
continue;
Debug::log(CRIT, "[core] Polling fds failed with {}", errno);
attemptRestoreOnDeath();
m_bTerminate = true;