exit(1);
}
- if (bind(server_sock, reinterpret_cast<const sockaddr *>(&addr), sizeof(addr)) == -1) {
+ if (::bind(server_sock, reinterpret_cast<const sockaddr *>(&addr), sizeof(addr)) == -1) {
log_perror("bind");
exit(1);
}
{
// Set back the close-on-exec flag for the socket.
// (This can't leak into a child, since we haven't been started yet.)
- fcntl(server_sock, F_SETFD, 1);
+ fcntl(server_sock, F_SETFD, O_CLOEXEC);
}
AcceptorProto Acceptor::serialize() const