From f860cfc76c75e5677dcb6e3e4cb13b01e22d960c Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 21 Nov 2023 23:29:09 -0500 Subject: [PATCH] protocols/tcp: Correct implementation of MSG_NOSIGNAL. The other send_signal invocation correctly checked NOSIGNAL already. --- src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp b/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp index 2f7b3840e8..ae76349b7b 100644 --- a/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp +++ b/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp @@ -846,7 +846,7 @@ TCPEndpoint::SendData(net_buffer *buffer) if (!is_writable(fState) && !is_establishing(fState)) { // we only send signals when called from userland - if (gStackModule->is_syscall()) + if (gStackModule->is_syscall() && (flags & MSG_NOSIGNAL) == 0) send_signal(find_thread(NULL), SIGPIPE); return EPIPE; }