vsock: send SIGPIPE on write to shutdowned socket
POSIX requires to send SIGPIPE on write to SOCK_STREAM socket which was shutdowned with SHUT_WR flag or its peer was shutdowned with SHUT_RD flag. Also we must not send SIGPIPE if MSG_NOSIGNAL flag is set. Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
ca5ab9638e
commit
8ecf0cedc0
@ -1921,6 +1921,9 @@ out_err:
|
||||
err = total_written;
|
||||
}
|
||||
out:
|
||||
if (sk->sk_type == SOCK_STREAM)
|
||||
err = sk_stream_error(sk, msg->msg_flags, err);
|
||||
|
||||
release_sock(sk);
|
||||
return err;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user