mirror of
https://github.com/vishvananda/netlink
synced 2025-04-06 17:41:37 +00:00
Set SOCK_CLOEXEC when creating netlink socket
- So that the socket is not shared across execs Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
d71ebad8a5
commit
c682914b0b
@ -451,7 +451,7 @@ type NetlinkSocket struct {
|
||||
}
|
||||
|
||||
func getNetlinkSocket(protocol int) (*NetlinkSocket, error) {
|
||||
fd, err := syscall.Socket(syscall.AF_NETLINK, syscall.SOCK_RAW, protocol)
|
||||
fd, err := syscall.Socket(syscall.AF_NETLINK, syscall.SOCK_RAW|syscall.SOCK_CLOEXEC, protocol)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user