This is the mail archive of the mailing list for the Cygwin project. See the Cygwin home page for more information.
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Cygwin B20.1 Expect: timeout broken, nonmatching pattern hangs forever

The "timeout" feature of expect seems to be broken in B20.1.  When a
pattern doesn't match, expect hangs forever.  For example, the
following commands entered interactively at the expect prompt cause it
to hang:

  expect1.1> set timeout 1
  expect1.2> exp_spawn cmd.exe
  expect1.3> expect foo

The string "foo" does not appear in cmd.exe's output, so
expect should time out after 1 second.  Instead it hangs.

I'm running expect.exe from the cygwin B20.1 release.
(h-i586-cygwin32\bin\expect.exe) on Windows NT 4.0.

I have also tried Gordon Chaffee's expect-NT port
It works on the example above if I use his -pipes option
to exp_spawn.  I hesitate to switch to Gordon's port because:

  1. his expect sources are older (5.21 vs. 5.26 in cygwin b20.1)
  2. he uses visual c++.

Number 2 is the main problem.  I have a large amount of C source code
in my application as well as other Tcl extensions, have it all
compiling nicely under gcc and prefer not to maintain a visual c++

Thanks for any insight into this problem.

Krist Roginski  (408) 374-4174 x305

Want to unsubscribe from this list?
Send a message to