RFD: Rework/extending functionality of mdev

Michael Conrad mconrad at intellitree.com
Fri Mar 13 11:41:08 UTC 2015


On 3/13/2015 3:25 AM, Harald Becker wrote:
> This is splitting operation of a big process in different threads, 
> using an interprocess communication method. Using a named pipe (fifo) 
> is the proven Unix way for this ... and it allows #2 without blocking 
> #1 or #0.

Multiple processes writing into the same fifo is not a valid design.  
Stream-writes are not atomic, and your message can theoretically get cut 
in half and interleaved with another process writing the same fifo.  (in 
practice, this is unlikely, but still an invalid design)

If you want to do this you need a unix datagram socket, like they use 
for syslog.

It is also a broken approximation of netlink because you don't preserve 
the ordering that netlink would give you, which according to the kernel 
documentation was one of the driving factors to invent it.  If someone 
really wants a netlink solution they will not be happy with a fifo 
approximation of one.


More information about the busybox mailing list