This is the mail archive of the cygwin@cygwin.com 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]

Re: Possible bug? Re: Strange behaviour when closing cygwin


On Wed, May 30, 2001 at 09:58:27PM -0400, Kevin Schnitzius wrote:
>> From: Jonadab the Unsightly One [mailto:jonadab@bright.net]
>> 
>> # >>>Once pressed the key sequence seems to get
>> # >>>stored and is only
>> # >>
>> # >>It's a W2K "feature" which is related to starting Cygwin 
>> via a batch
>> # >>file.  You can't change that AFAIK.
>> # 
>> # You can generalize Corinna's message from W2K to Windows.  
>> # It's a Windows feature.
>> 
>> I'm using Cygwin (just got the latest version this week, 
>> but I had a slightly earlier version since earlier this 
>> year) on Windows 95 OSR 2 and have never experienced this 
>> probem at any time.  I can start a bash shell, press 
>> ctrl-c any number of times I like in whatever circumstances 
>> I want, and then type logout and the bash window vanishes
>> forthwith, sans passing go or collecting $200.
>
>It all depends on whether you have "notty" or "tty" in the 
>CYGWIN environment variable.  With "notty" set, it seems that
>the ^C is passed through to the underlying batch cmd processor.

With CYGWIN=tty, the console window is essentially set in "raw mode"
where each character is sent directly to the executing process.
Characters like CTRL-C don't have any special effect.

Without CYGWIN=tty, a cygwin process is pretty much a normal console
mode process.  When a CTRL-C is hit, the whole windows process group is
notified, including the cmd.exe (or command.com) which is executing the
.bat file which is executing bash.  So, when you exit bash, cmd.exe has
remembered that you hit a CTRL-C and is kindly asking you if you'd like
to exit -- even though you are about to exit anyway, apparently.

cgf


--
Want to unsubscribe from this list?
Check out: 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]