Mailinglist Archive: opensuse-bugs (9018 mails)

< Previous Next >
[Bug 427270] New: Segmentation fault in expect
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Thu, 18 Sep 2008 02:40:51 -0600 (MDT)
  • Message-id: <bug-427270-21960@xxxxxxxxxxxxxxxxxxxxxxxxx/>
https://bugzilla.novell.com/show_bug.cgi?id=427270


Summary: Segmentation fault in expect
Product: openSUSE 11.0
Version: Final
Platform: i686
OS/Version: openSUSE 11.0
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Development
AssignedTo: pth@xxxxxxxxxx
ReportedBy: sbron@xxxxxxxxxx
QAContact: qa@xxxxxxx
Found By: Customer


A very simple and straight forward expect script segfaults at the second expect
command.

Example script:

#!/usr/bin/expect -f

set host www.google.com
log_user 1

set timeout 10
if {[catch {spawn lynx -cfg /dev/null http://$host/}]} {
puts stderr "Failed to execute lynx"
exit 2
}
match_max 5000
expect {
-exact {Allow? (Y/N/Always/neVer)} {}
timeout {
puts stderr "Connection timed out"
exit 2
}
}
send -- "n"
expect -exact {Allow? (Y/N/Always/neVer)}
send -- "n"
expect -exact {___________________}
# Quit
send -- "q"
expect -exact "Are you sure you want to quit? (y) "
send -- "y"
expect eof


--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >
Follow Ups