[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] Atomically block signals in signal event callbacks



Hi,

I've very recently added libevent to Netatalk, using it for a new service controller process which is responsible for starting and restarting other daemons (for now). There I use the signal handling facility of libevent for handling signals.

Thanks for libevent, I love it!

Now it seems at least in signal event callback, that the callback function can be interrrupted from the same signal it is the handler for. I noticed this because in a SIGCHLD handler I added a sleep(5) for debugging purposes and in a strace I noticed that the sleep got interrupted by another SIGCHLD. Afaict there's now way in libevent to mimic POSIX signal function semantics of using a sigmask for atomically blocking signals while the callback is running, is there?

Thanks!
-f
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.