mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Merge remote-tracking branch 'upstream/master' into fix3
This commit is contained in:
commit
169d9d3540
@ -156,9 +156,16 @@ void TaskStatsInfoGetter::init()
|
||||
if (netlink_socket_fd >= 0)
|
||||
return;
|
||||
|
||||
struct timeval tv;
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 50000;
|
||||
|
||||
netlink_socket_fd = ::socket(PF_NETLINK, SOCK_RAW, NETLINK_GENERIC);
|
||||
if (netlink_socket_fd < 0)
|
||||
throwFromErrno("Can't create PF_NETLINK socket");
|
||||
|
||||
if (0 != ::setsockopt(netlink_socket_fd, SOL_SOCKET, SO_RCVTIMEO, reinterpret_cast<const char *>(&tv), sizeof(tv)))
|
||||
throwFromErrno("Can't set timeout on PF_NETLINK socket");
|
||||
|
||||
::sockaddr_nl addr{};
|
||||
addr.nl_family = AF_NETLINK;
|
||||
|
Loading…
Reference in New Issue
Block a user