Use _close() instead of close() in addrconfig() to keep it from becoming a

potential cancellation point in libc_r.
This commit is contained in:
Jason Evans 2000-07-21 04:22:39 +00:00
parent 941b8e0799
commit 61e4108c41
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=63704

View File

@ -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;