Handle SIGPIPE during TCP stream test teardown

This commit is contained in:
evgeny committed 2026-10-13 00:58:40 +02:00
1 parent d2e3c32e91
commit d820c71417
1 file changed
+5
+5
View File
@@ -2,6 +2,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <openssl/sha.h>
@@ -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);