I used to use CFMessagePortRef to communicate between 2 processes on Mac os. It works well. In one process, I use CFMessagePortCreateLocal to create port, set callback and a