mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-17 23:42:07 +08:00
clocksd: handle EINTR on read() (#21892)
* handle EINTR on read
* Update selfdrive/clocksd/clocksd.cc
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 71a44cc275
This commit is contained in:
@@ -50,7 +50,10 @@ int main() {
|
||||
|
||||
uint64_t expirations = 0;
|
||||
while (!do_exit && (err = read(timerfd, &expirations, sizeof(expirations)))) {
|
||||
if (err < 0) break;
|
||||
if (err < 0) {
|
||||
if (errno == EINTR) continue;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
// Just run at 1Hz on apple
|
||||
while (!do_exit) {
|
||||
|
||||
Reference in New Issue
Block a user