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] |
On 8/2/2012 2:02 PM, Roger K. Wells wrote:I can't tell how much I want the old way back. I'll have to start using the MS command prompt.On 08/02/2012 04:26 PM, Daniel Colascione wrote:On 8/2/2012 12:32 PM, Marcin Kielar wrote:This may be true but it is a recent development.Steps to reproduce:This problem arises from Cygwin's use of CREATE_NEW_PROCESS_GROUP. From MSDN:
1. Start cygwin using cygwin.bat 2. Run `ping -t google.com` 3. Try breaking it with Ctrl+C
"When a process is created with CREATE_NEW_PROCESS_GROUP specified, an implicit call to SetConsoleCtrlHandler(NULL,TRUE) is made on behalf of the new process; this means that the new process has CTRL+C disabled. This lets shells handle CTRL+C themselves, and selectively pass that signal on to sub-processes. CTRL+BREAK is not disabled, and may be used to interrupt the process/process group."
SetConsoleCtrlHandler(NULL,TRUE) tells a process and all its children to ignore control-C. This problem only affects programs run in a console --- in a pty, Cygwin just terminates Windows processes in response to SIGINT.
ISTR a change a little while ago that made Cygwin not send SIGINT to processes controlled by actual consoles (as opposed to ptys) under the assumption that the Windows console machinery would do the job. It looks like the two changes interact unpleasantly.
-- Roger Wells, P.E. SAIC 221 Third St Newport, RI 02840 401-847-4210 (voice) 401-849-1585 (fax) roger.k.wells@saic.com
-- 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] |