title: C++ Shared-memory necessary for queue of std::strings to pass through JNI?
body: <p>I'm trying to understand what the mechanism is for getting a string from a c++ daemon I've written to Java for use by a UI.  I'll post a picture of what I envision, then continue the question afterward:</p>
  
  <p><img src="https://i.stack.imgur.com/Frkay.jpg" alt="enter image description here"></p>
  
  <p>There are two issues that I envision here:</p>
  
  <p>1) The semaphore needs to be available to the library.  In Windows, that could've been done with a named semaphore and access to it's handle.  In Linux, I've been pointed toward using a semaphore in shared memory and making processes aware of it through a key to the shared memory.  It's vague to me, but will that concept work to synchronize Java and the daemon?</p>
  
  <p>2)  Do I have to place the queue in shared memory in order to make the <code>???</code> link in the above chart work?  Can and should the queue reside in the .so?  </p>
  
  <p>So those are my concerns.  I'd love and welcome any and all help, challenges, and pleas for sanity and will do my best to provide all additionally necessary information.  Thanks in advance.</p>