Fix: close socket on protocol error, sendmsg MSG_NOSIGNAL
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 26 Aug 2015 22:24:11 +0000 (18:24 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 26 Aug 2015 22:31:45 +0000 (18:31 -0400)
Don't try to keep interacting with sessiond when a protocol error is
detected at the UST application side: this means we cannot trust the
protocol anymore, so there is no reason for keeping the socket open.
For instance, if the application is exiting and we receive a new stream,
we're effectively not reading the stream data, and we return an error.
Unfortunately, the session daemon may try to send us another command,
but we will try interpreting the stream data as a command, which is
invalid.

Also, use MSG_NOSIGNAL flag in the fds recvmsg, so the session daemon
don't get killed with SIGPIPE when it cannot send to the socket due to
connection closed.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

No differences found
This page took 0.026179 seconds and 5 git commands to generate.