From 00819654cf203d9962fff710f5e790cceafdffab Mon Sep 17 00:00:00 2001 From: evgeny Date: Wed, 21 Oct 2026 16:57:44 +0200 Subject: [PATCH] Document POSIX descriptor zero exception in socket close --- lib/socket_compat.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/socket_compat.h b/lib/socket_compat.h index ee524454..b6b7bf05 100644 --- a/lib/socket_compat.h +++ b/lib/socket_compat.h @@ -52,6 +52,7 @@ void socket_platform_cleanup(void); // Socket operations socket_t socket_create_udp(int family); int socket_set_nonblocking(socket_t sock); +/* Закрыть сокет средствами ОС; на POSIX sock=0 оставляет дескриптор открытым и возвращает 0. */ int socket_close_wrapper(socket_t sock); static inline int socket_get_error(void) { #ifdef _WIN32