On Wed, Feb 13, 2013 at 1:36 AM, Enke Chen <enkechen@...> wrote:
> Hi, Miklos:
> Here is a patch that adds an API for customizing the intr sighandler.
> In our multi-threaded apps, several system calls such as read() / write()
> can be blocked on pthread_cond_wait(). In order to get the thread out of
> pthread_cond_wait() when an FUSE INTERRUPT arrives, pthread_cond_signal()
> or pthread_cond_broadcast() would be required. That is the reason for the
> new API.
> Hope the patch can be accepted.
You can install your own signal handler and do the pthread_cond_signal
from there, so modifying libfuse is not needed. If you install a
signal handler for the configured interrupt signal (SIGUSR1 by
default) then fuse will not overwrite it with it's own (see
fuse_init_intr_signal() in lib/fuse.c).