From 72bcbd98e80163b5634698b55dd8762633d7a6a9 Mon Sep 17 00:00:00 2001 From: evgeny Date: Tue, 13 Oct 2026 00:58:40 +0200 Subject: [PATCH] Handle SIGPIPE during TCP stream test teardown --- tests/test_stream_service.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_stream_service.c b/tests/test_stream_service.c index 77137296..d6e9e524 100644 --- a/tests/test_stream_service.c +++ b/tests/test_stream_service.c @@ -2,6 +2,7 @@ #include #include #include +#include #include @@ -1019,6 +1020,10 @@ int main(void) { debug_set_category_level(DEBUG_CATEGORY_STREAM, DEBUG_LEVEL_DEBUG); debug_set_category_level(DEBUG_CATEGORY_MEMBER_SYNC, DEBUG_LEVEL_INFO); debug_set_category_level(DEBUG_CATEGORY_SYS, DEBUG_LEVEL_WARN); +#ifdef SIGPIPE + CHECK(signal(SIGPIPE, SIG_IGN) != SIG_ERR); + DEBUG_INFO(DEBUG_CATEGORY_STREAM, "TCP stream test ignores SIGPIPE; closed socket errors are handled by transport"); +#endif test_member_format(); size_t allocations = u_get_allocated_count(); test_clock_init(100); utun_instance_set_tun_init_enabled(0);