cygwin apps started from non-cygwin shell. */
if (c == '\003' && p && p->ctty == ttyp->ntty && p->pgid == pgid
&& ((p->process_state & PID_NOTCYGWIN)
- || (p->exec_dwProcessId == p->dwProcessId)
+ || ((p->exec_dwProcessId == p->dwProcessId)
+ && ttyp->pty_input_state_eq (tty::to_nat))
|| !(p->process_state & PID_CYGPARENT)))
{
/* Ctrl-C event will be sent only to the processes attaching
with_debugger = true; /* inferior is cygwin app */
if (!(p->process_state & PID_NOTCYGWIN)
&& (p->exec_dwProcessId == p->dwProcessId) /* Check marker */
+ && ttyp->pty_input_state_eq (tty::to_nat)
&& p->pid == pgid)
with_debugger_nat = true; /* inferior is non-cygwin app */
}