From owner-freebsd-ports@FreeBSD.ORG Tue Nov 18 07:38:35 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6BA3216A4CE for ; Tue, 18 Nov 2003 07:38:35 -0800 (PST) Received: from yertle.kcilink.com (yertle.kcilink.com [216.194.193.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B83843FAF for ; Tue, 18 Nov 2003 07:38:34 -0800 (PST) (envelope-from khera@kcilink.com) Received: by yertle.kcilink.com (Postfix, from userid 100) id B2258217B2; Tue, 18 Nov 2003 10:38:33 -0500 (EST) From: Vivek Khera MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16314.15609.612334.879707@yertle.int.kciLink.com> Date: Tue, 18 Nov 2003 10:38:33 -0500 To: ports@freebsd.org X-Mailer: VM 7.14 under 21.4 (patch 14) "Reasonable Discussion" XEmacs Lucid Subject: expect 5.38.0_3 problems X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2003 15:38:35 -0000 Yesterday I updated to the latest expect port, 5.38.0_3, and since then I've had a lot of failures with spawned processes. My expect script spawns a telnet and then issues some commands. Every so often, the telnet goes into a spin loop, and expect times out on that command, yet the child expect keeps waiting for the process to begin. If I kill the looping telnet, expect gives me an error about a non-open file handle. It doens't happen every time, but it is happening with significant frequency. This has also happened with an expect script running the "host" program to see if a name resolves to test if the name server is up. Has anyone else run into this? My guess is it has something to do with TCL 8.4 since that's the only change from the prior version of expect (I compile without X on this server). Here's the script to check for an up name server: --cut here-- #!/usr/local/bin/expect -f # -*- tcl -*- # check if the name server is running on the given host. # return 0 if alive, 2 on timeout, 1 on any other error # V. Khera # 4-MAR-1995 # $Id: checknameserver,v 1.3 2001/07/05 15:48:24 khera Exp $ exp_version -exit 5.0 if $argc!=1 { send_user "usage: checknameserver host\n" exit } set host $argv proc systemdead {} { puts "The system is dead\r" exit 1 } proc systemdeadto {} { puts "The system is not responding quickly\r" exit 2 } proc systemalive {} { puts "The system is alive\r" exit 0 } proc systemunknown {} { puts "Unknown system name!\r" exit 1 } # see if localhost has an entry spawn host -t a localhost $host expect { timeout systemdeadto "Host not found, try again" systemdead "Error in looking up server name" systemunknown -re "has address 127\.0\.0\.1" systemalive } # if we fall through the cracks, assume the worst systemdead --cut here--