test nodes: make the timerfd non-blocking

Relates to #1377
This commit is contained in:
George Kiagiadakis 2021-07-01 11:51:11 +03:00
parent 5aa9c95390
commit 36c7e820d8
5 changed files with 9 additions and 5 deletions

View file

@ -763,7 +763,8 @@ impl_init(const struct spa_handle_factory *factory,
this->timer_source.func = on_input;
this->timer_source.data = this;
this->timer_source.fd = spa_system_timerfd_create(this->data_system, CLOCK_MONOTONIC, SPA_FD_CLOEXEC);
this->timer_source.fd = spa_system_timerfd_create(this->data_system, CLOCK_MONOTONIC,
SPA_FD_CLOEXEC | SPA_FD_NONBLOCK);
this->timer_source.mask = SPA_IO_IN;
this->timer_source.rmask = 0;
this->timerspec.it_value.tv_sec = 0;

View file

@ -795,7 +795,8 @@ impl_init(const struct spa_handle_factory *factory,
this->timer_source.func = on_output;
this->timer_source.data = this;
this->timer_source.fd = spa_system_timerfd_create(this->data_system, CLOCK_MONOTONIC, SPA_FD_CLOEXEC);
this->timer_source.fd = spa_system_timerfd_create(this->data_system, CLOCK_MONOTONIC,
SPA_FD_CLOEXEC | SPA_FD_NONBLOCK);
this->timer_source.mask = SPA_IO_IN;
this->timer_source.rmask = 0;
this->timerspec.it_value.tv_sec = 0;