bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Ken Brown
Subject: bug#7225: 23.2.50; [PATCH] C-c C-c doesn't work in shell mode (Cygwin)
Date: Sat, 16 Oct 2010 14:22:50 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4

On 10/16/2010 9:26 AM, Eli Zaretskii wrote:
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.

OK, now I understand.

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
EMACS_KILLPG.

When you have fixed process_send_signal, you can then introduce
SIGNALS_VIA_CHARACTERS for Cygwin.

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

Thanks for the suggestion. I would like to dig into this, but I don't really know enough. I'll see if I can get some help on the Cygwin list.

Ken





reply via email to

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