Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Expect timeout problem after matching the prompt.

9 views
Skip to first unread message

mgaurav

unread,
Aug 4, 2005, 1:01:10 AM8/4/05
to
I've started to see a weird problem, I've script of router reload...
the script matches "Press RETURN to get started prompt" and then sends
"\r"... and the best of my knowledge router should just rerun the
prompt, but it does not and the expect block timeout eventually.
However, if I put a delay or say 3 seconds before sending "\r" then it
works fine.

Any help on this is greatly appreciated.

Thanks much,
-Gaurav

Don Libes

unread,
Aug 4, 2005, 12:14:23 PM8/4/05
to
"mgaurav" <mga...@hotmail.com> writes:

This is a common problem - programs prompt before they're ready to
actually handle the response. With humans, it's not noticeable
because humans don't respond quickly enough. But since Expect needs
to be told to wait in such cases.

Don

mgaurav

unread,
Aug 4, 2005, 2:36:48 PM8/4/05
to
Thanks for your response, i was worried because i see this problem only
on one particular router, others similar routers works fine.
If this is the case, is it ok to put an "after 5000" before sending a
"\r" after expect is successful for a prompt. Please let me know.

Thanks again for your response.
Regards,
-Gaurav

Don Libes

unread,
Aug 4, 2005, 6:26:32 PM8/4/05
to
"mgaurav" <mga...@hotmail.com> writes:

5000 is overkill. 1000 should be enough. Of course, there are no
guarantees when it comes to poorly designed software.

Don

Michael A. Cleverly

unread,
Aug 4, 2005, 8:31:14 PM8/4/05
to
On Thu, 4 Aug 2005, Don Libes wrote:

> Of course, there are no guarantees when it comes to poorly designed
> software.

QOTW?

0 new messages