This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cannot change console mode during usage of expect


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
error information?

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?

..mark




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]