Results 1 to 5 of 5
We are trying to simulate something very similar to ssh which is why we need to use pseudo terminals. We've tried creating the master-slave pair using forkpty.
Here we are ...
- 03-01-2008 #1Just Joined!
- Join Date
- Mar 2008
- Posts
- 3
Pseudo terminal help
We are trying to simulate something very similar to ssh which is why we need to use pseudo terminals. We've tried creating the master-slave pair using forkpty.
Here we are assuming the child process is the slave but we cant see the output of the child process anywhere. ( for starters we've just put a printf here ) .Because we could not see the output any where, we redirected STDOUT within the child to a separate file. Here we got the output in the file.
So we are not able to figure out how to get the output of the slave terminal and how to establish a connection between the master and slave.
So can anyone tell me if i am on the right track and what exactly should be the program flow ??
- 03-01-2008 #2
I wrote a program using pty's once. You might be interested in looking at the source. I will keep it there for at least two weeks.
Hope this helps.--
Bill
Old age and treachery will overcome youth and skill.
- 03-03-2008 #3Just Joined!
- Join Date
- Mar 2008
- Posts
- 3
hey..thanks a lot..i'll check it out..
- 03-09-2008 #4Just Joined!
- Join Date
- Mar 2008
- Posts
- 3
hey..your code really helped us understand the working of pseudo terminals. It worked for us.. we managed to get our thing working! Thanks a lot for the help!!
- 03-09-2008 #5
Glad to help.
--
Bill
Old age and treachery will overcome youth and skill.


Reply With Quote