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:56 +0000 (18:31 -0400)
commit4fb0740e68171e050c744b50a5607a25e6b3f472
tree6f35caec8a15b4b489dbe56067017d14abe42357
parent3ad4bc8722d657273c31c357c73a2a03c4964132
Fix: close socket on protocol error, sendmsg MSG_NOSIGNAL

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>
liblttng-ust-comm/lttng-ust-comm.c
liblttng-ust/lttng-ust-comm.c
This page took 0.025907 seconds and 4 git commands to generate.