On Thu, Oct 10, 2013 at 3:08 PM, Sven Schnelle <sv...@stackframe.org> wrote: > i was debugging a problem in my own program which sometimes received > 'Address already in use' during creation of the netlink socket. It turned > out > that udevd has the same bug. What actually happens is that udevd opens > the netlink socket, and forks afterwards. that doesn't sound bad at all, but > the pid of udevd is stored inside the nl_sockaddr structure. So after udevd > has forked, the PID stored in the kernel is no longer existent. If another > process > is now started that wants to do netlink communication with the kernel and > has (by coincidence) the same PID, it will fail.
What's the actual problem you see? Note, that the netlink *address* just happens to be the PID in the usual case, but it's not necessarily the PID. For netlink t's just a number, an address not a PID. The second netlink socket a process opens gets a negative address instead of anything related to the PID of the caller. Kay _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel