Skip to content

backend/avision: fix thread cancellation

sigprocmask does not work for threads but only for forked processes. Even though a thread-safe version, pthread_sigmask, we do not use it since using singals with threads is a bad practice. Instead implement pthread's own cancellation method. Because sane_read blocks when reader_process is terminated, read_fds is closed and invalidated to make sane_read abort read and return gracefully.

Merge request reports