mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 01:18:29 -04:00
AP_HAL: Socket: add set_cloexec
This commit is contained in:
parent
574a2b3652
commit
584c5d5806
@ -110,6 +110,14 @@ void SocketAPM::set_blocking(bool blocking)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
set cloexec state
|
||||
*/
|
||||
void SocketAPM::set_cloexec()
|
||||
{
|
||||
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||
}
|
||||
|
||||
/*
|
||||
send some data
|
||||
*/
|
||||
|
@ -39,6 +39,7 @@ public:
|
||||
bool bind(const char *address, uint16_t port);
|
||||
void reuseaddress();
|
||||
void set_blocking(bool blocking);
|
||||
void set_cloexec();
|
||||
void set_broadcast(void);
|
||||
|
||||
ssize_t send(const void *pkt, size_t size);
|
||||
|
Loading…
Reference in New Issue
Block a user