I have a requirement to share a single serial port between two or more linux containers. The LXCs are spawned by the host linux.
I explored the option of socat, wherein the host will open a TCP connection to which the guest containers will connect and map their virtual ttys to this TCP connection. And I am also thinking of providing a way to identify the clients at the server based on which the host can switch the connection that will actually write into the host tty.
I am not sure if this will fly in all scenarios, so checking with learned people to see if there is any other solution to the problem or if the proposed solution will even work.