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: ctrl-c to windows program causes mintty to hang [1.7.20 / win7]


Greetings, Jeremy Hetzler!

> All,

> Steps:
> - Open mintty
> - Run a Windows program like c:\windows\system32\ping.exe
> - While the Windows program is running, press ctrl-c

> Result:
> - Windows program exits (disappears from task manager)

Check it with ping -t
It doesn't exit.

> - mintty hangs

> mintty's state in ps then appears as O ("waiting to output to a TTY").
> It does not respond to keyboard, mouse, or kill -9. It can be closed
> via task manager.

> Sending ctrl-c to Cygwin programs does not exhibit this problem. This
> behavior is new for me under 1.7.20. I have rebooted since updating
> Cygwin to no effect. Cygcheck output attached.

> Any ideas?

It's more interesting, than that.
The events are as follows:
1. Start mintty.
It starts bash and present you with a command prompt.

[]$ ps
      PID    PPID    PGID     WINPID   TTY     UID    STIME COMMAND
     4212       1    4212       4212  cons0   1004 16:58:35 /usr/bin/ps
    16116       1   16116      16116  ?       1004 16:58:28 /usr/bin/mintty
I    8708   16116    8708       6208  pty0    1004 16:58:28 /usr/bin/bash

2. Execute "/c/WINDOWS/system32/ping.exe -t localhost"
It starts YET ANOTHER bash, not visible to ps, even in -W mode, but clearly
spotted in task manager.
Module:                bash.exe
Full path:             C:\Programs\CygWin\bin\bash.exe
PID:                   15688
Parent PID:            6208  (bash.exe)
Priority:              8
Threads:               2

3. Now, if you Ctrl+C, the console hangs.
If you let it sit down and think a bit, the iterrupt will be delivered to ping
and it get out of the lockup.

Going to grab a snapshot and see if it affect anything.

P.S.
Standard console doesn't exhibit the lockup.


--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 09.06.2013, <16:56>

Sorry for my terrible english...


--
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]