AP_HAL_SITL: set cloexec on sitl-gps file descriptors
This commit is contained in:
parent
6d6366df48
commit
c5d13847b2
@ -75,6 +75,8 @@ int SITL_State::gps_pipe(void)
|
||||
gps_state.gps_fd = fd[1];
|
||||
gps_state.client_fd = fd[0];
|
||||
gps_state.last_update = AP_HAL::millis();
|
||||
fcntl(fd[0], F_SETFD, FD_CLOEXEC);
|
||||
fcntl(fd[1], F_SETFD, FD_CLOEXEC);
|
||||
HALSITL::UARTDriver::_set_nonblocking(gps_state.gps_fd);
|
||||
HALSITL::UARTDriver::_set_nonblocking(fd[0]);
|
||||
return gps_state.client_fd;
|
||||
|
Loading…
Reference in New Issue
Block a user