Merge "Add SOCK_CLOEXEC to NetlinkUtils.netlinkSocketForProto" into main
This commit is contained in:
commit
7412936a8c
1 changed files with 1 additions and 1 deletions
|
|
@ -230,7 +230,7 @@ public class NetlinkUtils {
|
|||
* @throws ErrnoException if the FileDescriptor not connect to be created successfully
|
||||
*/
|
||||
public static FileDescriptor netlinkSocketForProto(int nlProto) throws ErrnoException {
|
||||
final FileDescriptor fd = Os.socket(AF_NETLINK, SOCK_DGRAM, nlProto);
|
||||
final FileDescriptor fd = Os.socket(AF_NETLINK, SOCK_DGRAM | SOCK_CLOEXEC, nlProto);
|
||||
Os.setsockoptInt(fd, SOL_SOCKET, SO_RCVBUF, SOCKET_RECV_BUFSIZE);
|
||||
return fd;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue