[PATCH hwc v2 03/18] drm_hwcomposer: drmeventlistener: Set nl_pid to 0
Alexandru Gheorghe
alexandru-cosmin.gheorghe at arm.com
Wed Apr 11 15:22:14 UTC 2018
By setting nl_pid to 0, we let the kernel to assign a port for us.
In the current implementation there is no way we could create more
than one instance for drmeventlistener.
Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe at arm.com>
---
drmeventlistener.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drmeventlistener.cpp b/drmeventlistener.cpp
index 984d1dd..5534182 100644
--- a/drmeventlistener.cpp
+++ b/drmeventlistener.cpp
@@ -46,7 +46,7 @@ int DrmEventListener::Init() {
struct sockaddr_nl addr;
memset(&addr, 0, sizeof(addr));
addr.nl_family = AF_NETLINK;
- addr.nl_pid = getpid();
+ addr.nl_pid = 0;
addr.nl_groups = 0xFFFFFFFF;
int ret = bind(uevent_fd_.get(), (struct sockaddr *)&addr, sizeof(addr));
--
2.7.4
More information about the dri-devel
mailing list