File 1110-odbc-Fix-odbcserver-not-terminated-at-timeout.patch of Package erlang

From 473bd5c3dcef07d95f3423fd5013859bcd53dd15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niklas=20=C3=85holm?= <niklas.aholm@nordnet.se>
Date: Fri, 5 Feb 2021 08:22:38 +0100
Subject: [PATCH] odbc: Fix odbcserver not terminated at timeout

When a query timeout and makes the client process exit with reason
timeout the odbcserver port pogram is not terminated on port_close/1.

https://bugs.erlang.org/browse/ERL-1448
---
 lib/odbc/c_src/odbcserver.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/odbc/c_src/odbcserver.c b/lib/odbc/c_src/odbcserver.c
index ee5dc9cd0a..15ca433419 100644
--- a/lib/odbc/c_src/odbcserver.c
+++ b/lib/odbc/c_src/odbcserver.c
@@ -259,10 +259,10 @@ static void str_tolower(char *str, int len);
 /* ----------------------------- CODE ------------------------------------*/
 
 #if defined(WIN32)
-#  define DO_EXIT(code) do { ExitProcess((code)); exit((code));} while (0)
-/* exit() called only to avoid a warning */
+#  define DO_EXIT(code) do { ExitProcess((code)); _exit((code));} while (0)
+/* _exit() called only to avoid a warning */
 #else
-#  define DO_EXIT(code) exit((code))
+#  define DO_EXIT(code) _exit((code))
 #endif
 
 /* ----------------- Main functions --------------------------------------*/
-- 
2.26.2

openSUSE Build Service is sponsored by