I have a process which reads and writes to a pseudo terminal. I would like to open xterm and have it open a pseudo terminal and leave it open so I can communicate with this process without creating yet another process.
Right now I use the following hack. I create a trivial program:
void main() {while(1);}
and then I open it in an xterm window like this:
xterm ~/a.out
Then I can write to the other process and read its output on the xterm window. Is there any way I can do this without having xterm spawn some useless process?
Edit: The process I am trying to communicate with is an operating system which is running inside the Bochs emulator. I am trying to connect the serial port on the emulated system with a pseudo terminal on the host system. I specify the particular pseudo terminal in the Bochs configuration file like this:
com1: enabled=1, mode=term,dev=/dev/pts/4

xterm your_app, so that the application has the pseudo terminal bound to its stdin/out/err? – peterph Feb 6 at 15:40