title: socat with a virtual tty link and fork removes my pty link
body: <p>I require to be able to multiplex tcp connections to a single virtual tty for testing software that communicates over a serial port. I have been using the following command to create a server that listens on a tcp port, and then forwards data to the PTY. </p>
  
  <pre><code>socat -d -d PTY,link=/dev/ttyV1,waitslave,echo=0,raw TCP-LISTEN:11313,reuseaddr,fork
  </code></pre>
  
  <p>My problem is when a tcp client on port 11313 disconnects, socat removes my link to /dev/ttyV1, thus killing the session to everyone else who is connected.</p>
  
  <p>Is there a way to retain this link? Or perhaps create a pseudo tty outside of socat so that I don't have to worry about maintaining it? I've tried /dev/tty1 and /dev/ttyS1 and I've not had any luck. My command for these was:</p>
  
  <pre><code>socat -d -d file:/dev/tty1,nonblock,echo=0,raw TCP-LISTEN:11313,reuseaddr,fork
  </code></pre>
  
  <p>My requirement: Be able to connect a piece of software to a serial tty on one end, and then connect a number of tcp clients on the other. Tcp clients messaging is properly serialized and multiplexed so that messages don't arrive on top of each other.</p>