AP_HAL_SITL: set cloexec on port 5760

This commit is contained in:
Peter Barker 2018-06-08 13:37:24 +10:00 committed by Andrew Tridgell
parent e3b68876a9
commit 574a2b3652

View File

@ -272,6 +272,7 @@ void UARTDriver::_tcp_start_connection(uint16_t port, bool wait_for_connection)
} }
setsockopt(_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); setsockopt(_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
setsockopt(_fd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one)); setsockopt(_fd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
fcntl(_fd, F_SETFD, FD_CLOEXEC);
_connected = true; _connected = true;
} }
} }