From: Ken Brown <kbrown@cornell.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "7225@debbugs.gnu.org" <7225@debbugs.gnu.org>
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 [thread overview]
Message-ID: <4CB9ED7A.5000805@cornell.edu> (raw)
In-Reply-To: <838w1yb757.fsf@gnu.org>
On 10/16/2010 9:26 AM, Eli Zaretskii wrote:
>> Date: Sat, 16 Oct 2010 08:44:28 -0400
>> From: Ken Brown<kbrown@cornell.edu>
>> CC: "7225@debbugs.gnu.org"<7225@debbugs.gnu.org>
>>
>>>> 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
next prev parent reply other threads:[~2010-10-16 18:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-15 23:36 bug#7225: 23.2.50; [PATCH] C-c C-c doesn't work in shell mode (Cygwin) Ken Brown
2010-10-16 7:32 ` Eli Zaretskii
2010-10-16 12:44 ` Ken Brown
2010-10-16 13:26 ` Eli Zaretskii
2010-10-16 18:22 ` Ken Brown [this message]
2010-10-17 21:40 ` Ken Brown
2010-10-17 22:08 ` Eli Zaretskii
2010-10-17 23:11 ` Ken Brown
2010-10-17 23:39 ` Ken Brown
2010-10-18 6:59 ` Eli Zaretskii
2010-10-18 11:58 ` Ken Brown
2010-10-18 17:37 ` Ken Brown
2010-10-18 5:49 ` Jan Djärv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CB9ED7A.5000805@cornell.edu \
--to=kbrown@cornell.edu \
--cc=7225@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.