[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#7225: 23.2.50; [PATCH] C-c C-c doesn't work in shell mode (Cygwin)

From: Eli Zaretskii
Subject: bug#7225: 23.2.50; [PATCH] C-c C-c doesn't work in shell mode (Cygwin)
Date: Sat, 16 Oct 2010 15:26:44 +0200

> Date: Sat, 16 Oct 2010 08:44:28 -0400
> From: Ken Brown <address@hidden>
> CC: "address@hidden" <address@hidden>
> >> C-c C-c
> >> (The cat process doesn't get killed.)
> >
> > Is the reason for this known?  It looks like the `kill' syscall isn't
> > doing its job, but if that's so, there should be a good reason for
> > that.
> The problem is the group id in the call to 'kill'.  Cygwin doesn't 
> define TIOCGPGRP, and the group id as set in line 6233 of process.c 
> (emacs-23 branch) is the wrong group id.

Does Cygwin have another way of getting the process group ID?  If so,
can it be used in process_send_signal instead of emacs_get_tty_pgrp?

> > Did you test it with a subprogram that puts its stdin into a mode
> > where (speaking in termios terms) the ISIG flag in c_lflag passed to
> > tcsetattr is unset?
> I don't know how to do this.  Can you give me a short test program to try?

Sorry, no, not off-hand.

> > In any case, I wouldn't recommend to take this workaround unless we
> > understand why this doesn't work without it.
> I'm not sure why you call it a workaround.  The comments preceding (and 
> in) the definition of process_send_signal make it clear that 
> SIGNALS_VIA_CHARACTERS is the preferred method.  It's used by GNU/Linux 
> (see src/s/gnu-linux.h) and several other systems.

SIGNALS_VIA_CHARACTERS is the preferred method for a few signals that
are raised by keyboard characters.  But unless you find a way to send
any signal to a subprocess on Cygwin, you will still have a bug,
although not with SIGINT.

So I suggest to look into tweaking process_send_signal so that it
works with Cygwin.  It looks like it makes all kinds of assumptions
regarding systems that don't have TIOCGPGRP, and they are probably
wrong for Cyugwin.  Or maybe you need something special in

When you have fixed process_send_signal, you can then introduce

However, this is just a suggestion.  If you don't feel like digging
into these issues, go ahead and commit the change.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]