As in linux pty \ pts, open a pair and do not write code for this. Just connect cat to one side, hook my applet to the other side.
The program should work with a com port, but for now I want to send a pseudo-terminal to it, so that I can throw test data with my hands.
I tried socat, but there it is not clear how to access pts from the outside and which terminal was allocated. There is a pty in mana, but his applications there are a little wrong.
Pipe and fifo do not suit me. Pipe due to the fact that O_NOCTTY, and fifo one-sided.
A more detailed recipe for socat can someone tell me.
The essence of what I want: in one terminal, run cat <> /dev/master-pseudotty-device or picocom /dev/master-pseudotty-device , in the second ./moya_proga /dev/slave-pseudotty-device .
cat | progcat | prog, and what have the terminals? "As in linux pty \ pts and not to write code for this" - and what about linux? - 0xdbscript -c ./your-progdoes it - avp