This is the mail archive of the
mailing list for the Cygwin project.
Re: Cannot change console mode during usage of expect
- From: Mark Geisert <mark at maxrnd dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 15 Apr 2015 22:36:43 +0000 (UTC)
- Subject: Re: Cannot change console mode during usage of expect
- Authentication-results: sourceware.org; auth=none
- References: <loom dot 20150415T025305-586 at post dot gmane dot org> <20150415073302 dot GU7343 at calimero dot vinschen dot de> <loom dot 20150415T192545-607 at post dot gmane dot org> <loom dot 20150415T235154-323 at post dot gmane dot org> <loom dot 20150416T002022-221 at post dot gmane dot org>
Keith Proctor writes:
> Mark Geisert <XXXXXXXXXXXXXX> writes:
Please don't quote email addresses in replies.
> > Keith Proctor writes:
> > > BTW, I expect GetConsoleMode and SetConsoleMode is standard
> > > usage by any console application. These calls work on Macintosh,
> > > Windows and Cygwin window without expect.
> > Are you sure you're using the Cygwin expect, and not a Windows-native expect
> > that just happens to be on your path?
> > ..mark
> Typing which expect comes back with /usr/bin/expect. This appears
> to be the standard Cygwin location.
> I did a search for expect on the system before installing Cygwin and
> did not find an executable. This is a fresh 2k8 R2 VM. I did not install
> another expect command from another source on the system and
> DOS does not include an expect functionality that I am aware of. Web
> shows that I would need to install another package such as HPs
> expect or ActiveState.
Fair enough. Expect communicates with spawned processes via ptys. On
Cygwin ptys are implemented as Windows "named pipes". Perhaps the spawned
process is trying to use those console-related Windows calls on a named pipe
descriptor that it wants to believe is a console's file descriptor.
In your original post you had a code snippet that showed on GetConsoleMode()
failure, I think, an error message was generated. Is that error message
what's being output, i.e., the name of the Windows call without any other
I know this subject has come up on the list before. There is a little shim
one can insert "in front of" a console-oriented application that makes it
think it's talking to a console instead of a pipe. I can't recall the name
of that shim, though. Can I get a little help from the list please?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple