The system calls process_vm_readv
and process_vm_writev
are meant for fast data transfer between processes. They are supposed to be used in addition to some traditional way of interprocess communication.
For example, you may use a regular pipe or fifo to transfer the required addresses between your processes. Then you may use those addresses to establish faster process_vm_
communication. The simpliest way to transfer something between forked processes should be the pipe()
function (man 2 pipe
has a good example of its usage). There are many other ways to do so of course, like using sockets or messages. You can even write an address to a file and let the other process read it.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…