|
@@ -387,6 +387,10 @@ public:
|
|
|
m_acceptor->open(ep.protocol(),bec);
|
|
|
if (!bec) {
|
|
|
m_acceptor->set_option(lib::asio::socket_base::reuse_address(m_reuse_addr),bec);
|
|
|
+ auto sfd = m_acceptor->native_handle();
|
|
|
+ int flags = fcntl(sfd, F_GETFD);
|
|
|
+ flags |= FD_CLOEXEC;
|
|
|
+ fcntl(sfd, F_SETFD, flags);
|
|
|
}
|
|
|
if (!bec) {
|
|
|
m_acceptor->bind(ep,bec);
|