pilebones / go-udev

Simple udev implementation in Golang
GNU General Public License v3.0
95 stars 28 forks source link

Let the kernel set nl_pid automatically #18

Closed debfx closed 3 years ago

debfx commented 3 years ago

Setting the netlink nl_pid to the pid is problematic if you want to use multiple netlink connections in the same application or the application runs in another pid namespace (nl_pid needs to to system-wide unique).

With nl_pid==0 the kernel automatically assigns a unique nl_pid.

pilebones commented 3 years ago

Ty @debfx to you MR and explanation inside an old issue https://github.com/pilebones/go-udev/issues/3. Ok for this change.