http://www.perlmonks.org?node_id=1062651


in reply to duplex serial read write

There is a neat program called ser2net that would allow you to maintain these things as two separate programs. Basically, it would expose the serial port via a tcp socket that program #1 can connect to, and is able to talk bidirectionally just like any socket client.

The second program...the one that just needs read access to what's coming out of the port could do one of two things:

It does support binding it's listen ports to only localhost, so it doesn't need to expose all of this to outside hosts. The man page is here. Prebuilt packages are out there for debian, redhat, etc.