On 15/03/2015 14:29, Natanael Copa wrote:
It should be possible to solve the hotplug problem by setting up
netlink listener, wait for event, when event arrives fork helper and
just hand over the netlink socket filedescriptor to the child. That way
we avoid pipes/fifos alltogehter. And we avoid the splitted messages
problem too.

 Nope, you can't solve the split messages this way, and even if you
could, you would need to make the helpers netlink-aware.

 The netlink socket is a datagram socket, not a stream one, whereas
an external helper will expect a stream on stdin. As long as it
reads stdin with read() instead of recvmsg(), the problem remains
the same.

 You can say that external helpers will have to expect datagrams
on stdin, but in that case those helpers have to do all the netlink
protocol parsing themselves; all you save is the initial connect(),
and you simply invented "netlink activation", if you catch my drift.

 To really gain something valuable and enable the use of helpers that
have no idea what the netlink even is, it's necessary to convert the
series of datagrams into a stream - so the anonymous pipe is the
simplest solution.

--
 Laurent

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to