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

potential cancellation point in libc_r.
This commit is contained in:
jasone 2000-07-21 04:22:39 +00:00
parent 6ab9a2d5e8
commit 6e408fc8c9

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;