I've two devices one is a pts (/dev/pts/N
) another is a socket(/path/to/socket
). I want infinitely read the pts and write that to socket, and infinitely read socket and write to pts.
What I am doing right now is to open both and create a read loop in two threads, But is there any simpler way with pipe that takes some works in kernel space ?