Subject: 24.3; comint-interrupt-subjob fails to interrupt pthreaded programs
From: Kari Pahula <[email-masked]>
To: [email-masked]
Date: Wed, 13 Aug 2014 13:52:30 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Trying to interrupt a debugged program in gud fails.  Pressing C-c C-c
just displays "C-c C-cQuit" but nothing else happens.  This works in
Emacs version 23.  It seems to me that Emacs 24 doesn't know how to
signal stop to programs using pthreads.  The program in question is
available at https://github.com/kaol/forcelayout

(gdb) r
Starting program: /home/kaol/src/forcelayout/forcelayout -i 1000 -r world-20140811.json picks-20140812.json world-20140812.json
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7308700 (LWP 14323)]
[New Thread 0x7ffff6ab7700 (LWP 14324)]
[New Thread 0x7ffff6266700 (LWP 14325)]
[New Thread 0x7ffff5a15700 (LWP 14326)]
[New Thread 0x7ffff51c4700 (LWP 14327)]
[New Thread 0x7ffff4973700 (LWP 14328)]
[New Thread 0x7ffff4122700 (LWP 14329)]
[New Thread 0x7ffff38d1700 (LWP 14330)]
[New Thread 0x7fffec645700 (LWP 14331)]
[Thread 0x7fffec645700 (LWP 14331) exited]
  C-c C-cQuit
k
(gdb) 

In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.12.2)
 of 2014-06-06 on barber, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11600000
System Description:	Debian GNU/Linux unstable (sid)

Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var/lib' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes'
 '--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars'
 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
 --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall'
 'LDFLAGS=-Wl,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_CTYPE: fi_FI.UTF-8
  value of $LC_TIME: en_GB.UTF-8
  value of $LANG: C
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Debugger

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  desktop-save-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  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:
M-x g d b <return> <return> s e t SPC a r g s SPC <down-mouse-2> 
<mouse-2> <return> r <return> C-c C-c k <return> M-x 
m e n u - b a <tab> m <tab> <return> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <menu-bar> <help-menu> <send-emacs-bug
-report>

Recent messages:
setting up indent stuff
Indentation variables are now local.
Indentation setup for shell type bash
Note: file is write protected
File mode specification error: (error "No Ebrowse file header found")
Wrote /home/kaol/.emacs.desktop.lock
Desktop: 533 buffers restored.
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
Menu-Bar mode enabled

Load-path shadows:
/usr/share/emacs24/site-lisp/css-mode/css-mode hides /usr/share/emacs/site-lisp/css-mode/css-mode
/usr/share/emacs/24.3/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs24/site-lisp/quilt-el/quilt hides /usr/share/emacs/site-lisp/quilt
/usr/share/emacs24/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs24/site-lisp/html-helper-mode/tempo hides /usr/share/emacs/24.3/lisp/tempo
/usr/share/emacs24/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.3/lisp/textmodes/ispell
/usr/share/emacs24/site-lisp/css-mode/css-mode hides /usr/share/emacs/24.3/lisp/textmodes/css-mode
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/24.3/lisp/textmodes/rst
/usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.3/lisp/textmodes/flyspell
/usr/share/emacs24/site-lisp/html-helper-mode/tempo hides /usr/share/emacs/site-lisp/html-helper-mode/tempo
/usr/share/emacs24/site-lisp/html-helper-mode/html-helper-mode hides /usr/share/emacs/site-lisp/html-helper-mode/html-helper-mode
/usr/share/emacs24/site-lisp/html-helper-mode/visual-basic-mode hides /usr/share/emacs/site-lisp/html-helper-mode/visual-basic-mode
/usr/share/emacs24/site-lisp/html-helper-mode/hhm-config hides /usr/share/emacs/site-lisp/html-helper-mode/hhm-config

Features:
(shadow sort gnus-util mail-extr emacsbug message cl-macs gv format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail mail-utils cus-start cus-load
gdb-mi bindat gud ebrowse ebuff-menu electric view haskell-cabal
haskell-utils python rx image-mode readme-debian diff-mode tex-mode
shell pcomplete m4-mode conf-mode nroff-mode jka-compr dired autoconf
autoconf-mode debian-control-mode debian-copyright css-mode apropos
haskell-font-lock haskell-mode haskell-string haskell-sort-imports
haskell-align-imports noutline outline easy-mmode flymake compile
dabbrev debian-bug rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
debian-changelog-mode add-log sql comint ansi-color ring nxml-uchnm
rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri
rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok
sgml-mode sh-script smie executable html-mode jsp-html-helper-mode
asp-html-helper-mode php-html-helper-mode html-helper-mode warnings
advice help-fns advice-preload tempo js byte-opt bytecomp byte-compile
cconv json imenu thingatpt perl-mode make-mode vc-git cc-langs cl cl-lib
cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs desktop server debian-el debian-el-loaddefs
haskell-mode-autoloads edmacro kmacro dpkg-dev-el dpkg-dev-el-loaddefs
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse 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
minibuffer loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)