title: Linux c++: multiple processes reading same serial port?
body: <p>Is it possible to have multiple processes doing IO on the same <code>/dev/ttyUSBx</code> device simultaneously? From the testing I've done it seems that the last (most recent) process to open the handle for read gets the output. When this process exits the next most recent process gets the output again.</p>
  
  <blockquote>
    <p>Start process A - read output from port<br>
    Start process B - read output from port. Process A stops reading.<br>
    Stop process B - process A starts reading again.</p>
  </blockquote>
  
  <p>Is there a param for the connection that would permit both to get the output? The <a href="http://man7.org/linux/man-pages/man2/open.2.html" rel="nofollow">docs</a> make it look like one could fork the original process but I rather need one long running and multiple separate (shorter lived) jobs.</p>