This comand (serial port redirector) accepts a single connection on TCP:11313 :
socat PTY,link=/dev/ttyV1,echo=0,raw,unlink-close=0 TCP-LISTEN:11313,forever,reuseaddr
However when the connection is lost, the above socat process is killed and the client is not able to connect.
I can solve this by adding fork
option at the end of the above command. But then multiple clients will be able to connect. But I want to accept only one connection.
Any ideas how to achieve this?