public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Ctrl-C not working as well as on Linux
@ 2005-07-21  9:01 Alex Goldman
  2005-07-21 12:11 ` Eric Blake
  2005-07-21 16:16 ` Igor Pechtchanski
  0 siblings, 2 replies; 5+ messages in thread
From: Alex Goldman @ 2005-07-21  9:01 UTC (permalink / raw)
  To: cygwin

On Linux, after I start a program that consumes 100% of CPU time, I
can usually terminate it just by typing Ctrl-C. This is very
convenient to me as a developer. However, using Cygwin in the same
situation, the shell becomes "bash (Not Responding)", and I have to
invoke the process manager and kill the process from there. Does
anyone know why this happens and what can be done about it?

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ctrl-C not working as well as on Linux
  2005-07-21  9:01 Ctrl-C not working as well as on Linux Alex Goldman
@ 2005-07-21 12:11 ` Eric Blake
  2005-07-21 14:53   ` Christopher Faylor
  2005-07-21 16:16 ` Igor Pechtchanski
  1 sibling, 1 reply; 5+ messages in thread
From: Eric Blake @ 2005-07-21 12:11 UTC (permalink / raw)
  To: Alex Goldman; +Cc: cygwin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Alex Goldman on 7/21/2005 2:49 AM:
> On Linux, after I start a program that consumes 100% of CPU time, I
> can usually terminate it just by typing Ctrl-C. This is very
> convenient to me as a developer. However, using Cygwin in the same
> situation, the shell becomes "bash (Not Responding)", and I have to
> invoke the process manager and kill the process from there. Does
> anyone know why this happens and what can be done about it?
> 

What terminal are you using?  If it is the Windows console, then you need
to have CYGWIN=tty in your environment before starting bash to ensure
saner behavior of Ctrl-C (at the expense of possibly breaking Windows
native applications in the same console).  See
http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html#id4736242 or search
some recent threads on the issue.

Hint - following the problem reporting directions would have helped us
know right off whether you were using the Windows console:

> Problem reports:       http://cygwin.com/problems.html

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC34/P84KuGfSFAYARAkGxAJ9JZA9vgGhft5+56OIG18T7NuFWlwCg2Ki/
0syY90mkH1hE9tsnaoFvwFo=
=tNiE
-----END PGP SIGNATURE-----

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ctrl-C not working as well as on Linux
  2005-07-21 12:11 ` Eric Blake
@ 2005-07-21 14:53   ` Christopher Faylor
  2005-07-21 15:38     ` Alex Goldman
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Faylor @ 2005-07-21 14:53 UTC (permalink / raw)
  To: cygwin

On Thu, Jul 21, 2005 at 06:06:39AM -0600, Eric Blake wrote:
>According to Alex Goldman on 7/21/2005 2:49 AM:
>>On Linux, after I start a program that consumes 100% of CPU time, I can
>>usually terminate it just by typing Ctrl-C.  This is very convenient to
>>me as a developer.  However, using Cygwin in the same situation, the
>>shell becomes "bash (Not Responding)", and I have to invoke the process
>>manager and kill the process from there.  Does anyone know why this
>>happens and what can be done about it?
>
>What terminal are you using?  If it is the Windows console, then you
>need to have CYGWIN=tty in your environment before starting bash to
>ensure saner behavior of Ctrl-C (at the expense of possibly breaking
>Windows native applications in the same console).

?  CTRL-C should work just fine without CYGWIN=tty.  In fact, it should
work better than CYGWIN=tty in situations where system time is being
consumed by a runaway process.

I don't see any reason why either Cygwin or bash should become unresponsive
due to a program which consumes CPU.

>Hint - following the problem reporting directions would have helped us
>know right off whether you were using the Windows console:
>
>> Problem reports:       http://cygwin.com/problems.html

Right.  In this situation a test case and better description of the
problem is required, too.

cgf

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ctrl-C not working as well as on Linux
  2005-07-21 14:53   ` Christopher Faylor
@ 2005-07-21 15:38     ` Alex Goldman
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Goldman @ 2005-07-21 15:38 UTC (permalink / raw)
  To: cygwin

My tty settings are fine. I run Rxvt by calling 

C:
chdir C:\cygwin\bin
set CYGWIN=codepage:oem tty binmode title
rxvt -sl 1000 -e bash --login -i


Looking into this more closely, I noticed that the problem occurs for
programs compiled using the free MSVC++ Toolkit 2003, but not GCC.

I think you can reproduce this behavior, if you have this compiler
installed and configured:
compile the program below with

cl loop.c

and run it:

./loop.exe

I can not terminate it using Ctrl-C. I think this has something to do
with signal handling.

---- loop.c ----

int main() {
    for(;;);
    return 0;
}

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ctrl-C not working as well as on Linux
  2005-07-21  9:01 Ctrl-C not working as well as on Linux Alex Goldman
  2005-07-21 12:11 ` Eric Blake
@ 2005-07-21 16:16 ` Igor Pechtchanski
  1 sibling, 0 replies; 5+ messages in thread
From: Igor Pechtchanski @ 2005-07-21 16:16 UTC (permalink / raw)
  To: Alex Goldman; +Cc: cygwin

On Thu, 21 Jul 2005, Alex Goldman wrote:

> On Linux, after I start a program that consumes 100% of CPU time, I
> can usually terminate it just by typing Ctrl-C. This is very
> convenient to me as a developer. However, using Cygwin in the same
> situation, the shell becomes "bash (Not Responding)", and I have to
> invoke the process manager and kill the process from there. Does
> anyone know why this happens and what can be done about it?

Must be a Windows (non-Cygwin) program.  Ctrl-C should still work, but it
would be interesting to strace the bash that invokes the program to see
what happens on Ctrl-C.

FYI, if you know the PID (cf "top"), you could use "/bin/kill -f WINPID"
to achieve the same effect as the task manager's "End process" button.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-07-21 16:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-21  9:01 Ctrl-C not working as well as on Linux Alex Goldman
2005-07-21 12:11 ` Eric Blake
2005-07-21 14:53   ` Christopher Faylor
2005-07-21 15:38     ` Alex Goldman
2005-07-21 16:16 ` Igor Pechtchanski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).