On Fri, Jul 1, 2022 at 1:10 PM Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote: > > On Fri, Jul 1, 2022 at 1:06 PM Bartosz Golaszewski <brgl@xxxxxxxx> wrote: > > > > All polling system calls have some way of being instructed to block > > indefinitely until some event is registered on the file descriptor. > > > > Make both the gpiod_chip_wait_info_event() and > > gpiod_line_request_wait_edge_event() accept negative timeout values in > > which case the underlying ppoll() will block indefinitely. > > Long time no user space done by me, so here my silly question: how to > kill a task that is blocking indefinitely in ppoll()? > Send a signal to it. It will return -1 and set errno to EINTR. Unless you explicitly masked all signals. In that case kill -9 still works. :) Bart