From 61e4108c4114e2443bc149d3ccddbe26b15b7811 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Fri, 21 Jul 2000 04:22:39 +0000 Subject: [PATCH] Use _close() instead of close() in addrconfig() to keep it from becoming a potential cancellation point in libc_r. --- lib/libc/net/getaddrinfo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index f44a14d79919..6d2354415612 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -1146,18 +1146,18 @@ addrconfig(pai) if ((s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) af = AF_INET; else { - close(s); + _close(s); if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) af = AF_INET6; else - close(s); + _close(s); } } if (af != AF_UNSPEC) { if ((s = socket(af, SOCK_DGRAM, 0)) < 0) return 0; - close(s); + _close(s); } pai->ai_family = af; return 1;