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@xxxxxxx> --- 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 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel