multipathd: Ensure that SIGINT, SIGTERM, SIGHUP and SIGUSR1 are delivered to the...
authorBart Van Assche <bart.vanassche@sandisk.com>
Wed, 27 Jul 2016 21:14:08 +0000 (14:14 -0700)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sun, 31 Jul 2016 09:01:55 +0000 (11:01 +0200)
commit534ec4ca35ef6a8045a91b38e4f087bb3e3fbbe8
treec694af642fa0f6c888b3c5cc8907d0b997f59361
parent77d2448d287fa17c7aa1b6ba52d122b6edbd63f9
multipathd: Ensure that SIGINT, SIGTERM, SIGHUP and SIGUSR1 are delivered to the uxsock thread

The POSIX standard mentions that the only way to guarantee that signals
are delivered to a specific thread is:
* Block all signals before the first pthread_create() call.
* Unblock signals from the thread that should receive signals.

Implement that approach in multipathd. And since ppoll() can return 0
if interrupted, also call handle_signals() if ppoll() returns 0.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
multipathd/main.c
multipathd/uxlsnr.c