libmultipath, multipathd: Rework SIGPIPE handling
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 16 Aug 2016 20:08:03 +0000 (13:08 -0700)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Mon, 29 Aug 2016 07:21:38 +0000 (09:21 +0200)
commit810082e7a8cf135a6749136fc5479bd5afb2098b
tree5300708ae263d598d6c96f536697670c4381f7e6
parent0ed4e4b3bfa41a9bffe547454c55a6e8f0b9a287
libmultipath, multipathd: Rework SIGPIPE handling

The behavior we want is as follows:
* If stdout or stderr is closed then SIGPIPE causes termination.
* Sending data to a socket that has been closed by the receiver
  does not cause multipathd to stop.

Hence unblock SIGPIPE and use MSG_NOSIGNAL when sending data over
a socket.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Benjamin Marzinski <bmarzins@redhat.com>
Cc: Gris Ge <fge@redhat.com>
libmpathcmd/mpath_cmd.c
libmultipath/uxsock.c
multipathd/main.c