mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 01:18:29 -04:00
SITL: Sim_Vicon: set CLOEXEC on vicon file decsriptor
This commit is contained in:
parent
b197d05476
commit
6d6366df48
@ -35,6 +35,10 @@ Vicon::Vicon()
|
|||||||
fd_my_end = tmp[1];
|
fd_my_end = tmp[1];
|
||||||
fd_their_end = tmp[0];
|
fd_their_end = tmp[0];
|
||||||
|
|
||||||
|
// close file descriptors on exec:
|
||||||
|
fcntl(fd_my_end, F_SETFD, FD_CLOEXEC);
|
||||||
|
fcntl(fd_their_end, F_SETFD, FD_CLOEXEC);
|
||||||
|
|
||||||
// make sure we don't screw the simulation up by blocking:
|
// make sure we don't screw the simulation up by blocking:
|
||||||
fcntl(fd_my_end, F_SETFL, fcntl(fd_my_end, F_GETFL, 0) | O_NONBLOCK);
|
fcntl(fd_my_end, F_SETFL, fcntl(fd_my_end, F_GETFL, 0) | O_NONBLOCK);
|
||||||
fcntl(fd_their_end, F_SETFL, fcntl(fd_their_end, F_GETFL, 0) | O_NONBLOCK);
|
fcntl(fd_their_end, F_SETFL, fcntl(fd_their_end, F_GETFL, 0) | O_NONBLOCK);
|
||||||
|
Loading…
Reference in New Issue
Block a user