From: enami tsugutomo <tsugutomo.enami@jp.sony.com>
To: 6649@debbugs.gnu.org
Subject: bug#6649: 24.0.50; C-g doesn't work since emacs 23.1 on BSD
Date: Fri, 16 Jul 2010 16:08:11 +0900 (JST) [thread overview]
Message-ID: <20100716070811.3CD845742@memory-leak.sm.sony.co.jp> (raw)
C-g doesn't work for emacs 23.1 or newer on BSD system. Build recent
emacs on BSD system (NetBSD in my case), invoke emacs using terminal,
switch to *scratch*, run (while t) and type C-g. Emacs continues to
run.
Since INTERRUPT_INPUT isn't defined for BSD, cbreak mode is used to
input characters. When multi-tty is merged, setting of INTR/QUIT
characters is conditoinalized (if (tty_out->input == stdin) ...) but the
expression is always false because FILE structure pointed by
tty_out->input is a one returned from fdopen() and it is never equal to
stdin.
Followings are terminal mode while running emacs-22.3 and 23.1
respectively:
enami@memory-leak% stty -f /dev/ttyp4
speed 9600 baud;
lflags: -icanon -iexten -echo echoe echoke echoctl
iflags: -icrnl -ixon ignbrk
oflags: -onlcr -oxtabs
cflags: cs8 -parenb
discard dsusp erase intr lnext quit reprint start stop
<undef> <undef> ^H ^G <undef> ^G <undef> <undef> <undef>
susp werase
<undef> <undef>
enami@memory-leak% stty -f /dev/ttyp4
speed 9600 baud;
lflags: -icanon -iexten -echo echoe echoke echoctl
iflags: -icrnl -ixon ignbrk
oflags: -onlcr -oxtabs
cflags: cs8 -parenb
discard dsusp erase intr lnext quit reprint start stop
<undef> <undef> ^H <undef> <undef> <undef> <undef> <undef> <undef>
susp werase
<undef> <undef>
enami@memory-leak%
For now, I'm using following workaround, but not sure if it is an
appropriate one.
=== modified file 'src/sysdep.c'
--- src/sysdep.c 2010-07-13 10:57:00 +0000
+++ src/sysdep.c 2010-07-15 00:39:59 +0000
@@ -989,6 +989,7 @@
init_sys_modes (struct tty_display_info *tty_out)
{
struct emacs_tty tty;
+ Lisp_Object terminal;
Vtty_erase_char = Qnil;
@@ -1042,7 +1043,8 @@
tty.main.c_cflag &= ~PARENB;/* Don't check parity */
}
#endif
- if (tty_out->input == stdin)
+ XSETTERMINAL(terminal, tty_out->terminal);
+ if (!NILP (Fcontrolling_tty_p (terminal)))
{
tty.main.c_cc[VINTR] = quit_char; /* C-g (usually) gives SIGINT */
/* Set up C-g for both SIGQUIT and SIGINT.
In GNU Emacs 24.0.50.4 (x86_64--netbsd)
of 2010-07-16 on rplaca.sm.sony.co.jp
configured using `configure 'x86_64--netbsd' '--with-x=no' 'build_alias=x86_64--netbsd' 'host_alias=x86_64--netbsd' 'target_alias=x86_64--netbsd''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
value of $XMODIFIERS: nil
locale-coding-system: nil
default enable-multibyte-characters: t
Major mode: Fundamental
Minor modes in effect:
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
ESC x r e p o r - C-b C-k t - TAB RET
Recent messages:
("src/emacs")
For information about GNU Emacs and the GNU system, type C-h C-a.
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr message sendmail regexp-opt rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils
gmm-utils mailheader emacsbug ediff-hook vc-hooks lisp-float-type
lisp-mode register page menu-bar rfn-eshadow timer jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process multi-tty emacs)
next reply other threads:[~2010-07-16 7:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-16 7:08 enami tsugutomo [this message]
2010-07-24 5:20 ` bug#6649: 24.0.50; C-g doesn't work since emacs 23.1 on BSD Dan Nicolaescu
2010-07-30 0:39 ` enami tsugutomo
2010-07-30 4:55 ` Dan Nicolaescu
2010-07-24 7:18 ` Andreas Schwab
2011-10-25 4:29 ` Chong Yidong
2011-10-25 16:41 ` Paul Eggert
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=20100716070811.3CD845742@memory-leak.sm.sony.co.jp \
--to=tsugutomo.enami@jp.sony.com \
--cc=6649@debbugs.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.