I'm not sure I'm understanding your write-up, so I'll attempt to clarify. Why are you spawning an xterm in a child process, which connects via TCP back to its own parent, and having the parent do the connection to the router? Why don't you have the spawned child run a connection script on its own which connects directly to the router, not going through the parent? You would still need Expect.pm, but once the interactive login is complete, piping stdin/stdout to your router connection should be trivial.
I think I am missing something. | [reply] |
what i have:
1. parent.pl starts, prompt for login data (user/pw), starts socket server and waiting for a hostname via stdin
2. once a hostname is typed, it executes a system("xterm -e client.pl") an waits for next input
3. the client.pl (in its own terminal) connects to the parent an fetches the login data & hostname.
4. then the client.pl opens a connection via expect.pm to the router, authenticates and gives the user control over the terminal
what i want:
1. script starts, prompt for login data (user/pw) and waiting for a hostname via stdin.
2. once a hostname is typed, a process(child) is forked and login data & hostname is piped to it.
3. the child starts its own xterm an connects therein to the router. <- no idea howto !?
4. after the authentication procedure, stdio is given to the user via the xterm <- also no idea howto..
hope this explanation is more clear :)
| [reply] [d/l] |