Elijah has asked for the wisdom of the Perl Monks concerning the following question:
First I thought it may be an issue with the tty or pty type because the app I am interacting with is not a standard type terminal service (popular Linux/BSD OS, cisco router, ssh console, etc). I tried setting the session to raw but that didn't help either. I then found some code in Expect.pm that appears to be re-assigning STDIN, STDOUT and STDERR starting on or around line 158:if ($nread == 0) { ... ... blah blah $exp->hard_close(); }
Could this have anything to do with it? Anyone suggestions on how I can get this to work with my non-standard OS?close(STDIN); open(STDIN,"<&". $slv->fileno()) or die "Couldn't reopen STDIN for reading, $!\n"; close(STDOUT); open(STDOUT,">&". $slv->fileno()) or die "Couldn't reopen STDOUT for writing, $!\n"; close(STDERR); open(STDERR,">&". $slv->fileno()) or die "Couldn't reopen STDERR for writing, $!\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Expect.pm early termination?
by shmem (Chancellor) on Jul 25, 2006 at 06:42 UTC | |
by Elijah (Hermit) on Jul 25, 2006 at 15:07 UTC | |
by shmem (Chancellor) on Jul 25, 2006 at 16:26 UTC | |
by Elijah (Hermit) on Jul 25, 2006 at 17:24 UTC | |
|
Re: Expect.pm early termination?
by Elijah (Hermit) on Jul 26, 2006 at 19:03 UTC | |
by Anonymous Monk on Mar 10, 2017 at 04:48 UTC |