Loading system/vendor_libs/test_vendor_lib/model/setup/async_manager.cc +1 −1 Original line number Diff line number Diff line Loading @@ -154,7 +154,7 @@ class AsyncManager::AsyncFdWatcher { } // set up the communication channel int pipe_fds[2]; if (pipe2(pipe_fds, O_NONBLOCK)) { if (pipe2(pipe_fds, O_NONBLOCK | O_CLOEXEC)) { LOG_ERROR( "%s:Unable to establish a communication channel to the reading " "thread", Loading system/vendor_libs/test_vendor_lib/net/posix/posix_async_socket_connector.cc +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ PosixAsyncSocketConnector::ConnectToRemoteServer( const std::chrono::milliseconds timeout) { LOG_INFO("Connecting to %s:%d in %d ms", server.c_str(), port, (int)timeout.count()); int socket_fd = socket(AF_INET, SOCK_STREAM, 0); int socket_fd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0); std::shared_ptr<PosixAsyncSocket> pas = std::make_shared<PosixAsyncSocket>(socket_fd, am_); Loading system/vendor_libs/test_vendor_lib/net/posix/posix_async_socket_server.cc +3 −2 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ PosixAsyncSocketServer::PosixAsyncSocketServer(int port, AsyncManager* am) struct sockaddr_in listen_address {}; socklen_t sockaddr_in_size = sizeof(struct sockaddr_in); OSI_NO_INTR(listen_fd = socket(AF_INET, SOCK_STREAM, 0)); OSI_NO_INTR(listen_fd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)); if (listen_fd < 0) { LOG_INFO("Error creating socket for test channel."); return; Loading Loading @@ -99,7 +99,8 @@ bool PosixAsyncSocketServer::Connected() { void PosixAsyncSocketServer::AcceptSocket() { int accept_fd = 0; OSI_NO_INTR(accept_fd = accept(server_socket_->fd(), NULL, NULL)); OSI_NO_INTR(accept_fd = accept4(server_socket_->fd(), NULL, NULL, SOCK_CLOEXEC)); if (accept_fd < 0) { LOG_INFO("Error accepting test channel connection errno=%d (%s).", errno, Loading Loading
system/vendor_libs/test_vendor_lib/model/setup/async_manager.cc +1 −1 Original line number Diff line number Diff line Loading @@ -154,7 +154,7 @@ class AsyncManager::AsyncFdWatcher { } // set up the communication channel int pipe_fds[2]; if (pipe2(pipe_fds, O_NONBLOCK)) { if (pipe2(pipe_fds, O_NONBLOCK | O_CLOEXEC)) { LOG_ERROR( "%s:Unable to establish a communication channel to the reading " "thread", Loading
system/vendor_libs/test_vendor_lib/net/posix/posix_async_socket_connector.cc +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ PosixAsyncSocketConnector::ConnectToRemoteServer( const std::chrono::milliseconds timeout) { LOG_INFO("Connecting to %s:%d in %d ms", server.c_str(), port, (int)timeout.count()); int socket_fd = socket(AF_INET, SOCK_STREAM, 0); int socket_fd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0); std::shared_ptr<PosixAsyncSocket> pas = std::make_shared<PosixAsyncSocket>(socket_fd, am_); Loading
system/vendor_libs/test_vendor_lib/net/posix/posix_async_socket_server.cc +3 −2 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ PosixAsyncSocketServer::PosixAsyncSocketServer(int port, AsyncManager* am) struct sockaddr_in listen_address {}; socklen_t sockaddr_in_size = sizeof(struct sockaddr_in); OSI_NO_INTR(listen_fd = socket(AF_INET, SOCK_STREAM, 0)); OSI_NO_INTR(listen_fd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)); if (listen_fd < 0) { LOG_INFO("Error creating socket for test channel."); return; Loading Loading @@ -99,7 +99,8 @@ bool PosixAsyncSocketServer::Connected() { void PosixAsyncSocketServer::AcceptSocket() { int accept_fd = 0; OSI_NO_INTR(accept_fd = accept(server_socket_->fd(), NULL, NULL)); OSI_NO_INTR(accept_fd = accept4(server_socket_->fd(), NULL, NULL, SOCK_CLOEXEC)); if (accept_fd < 0) { LOG_INFO("Error accepting test channel connection errno=%d (%s).", errno, Loading