GNU bug report logs - #16745
Can't send SIGTSTP from Emacs through GDB

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Barry OReilly <gundaetiapo@HIDDEN>; merged with #14597; dated Thu, 13 Feb 2014 19:34:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 14597 16745. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 16745 <at> debbugs.gnu.org:


Received: (at 16745) by debbugs.gnu.org; 14 Feb 2014 14:19:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 14 09:19:21 2014
Received: from localhost ([127.0.0.1]:51900 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WEJbs-0003VE-E9
	for submit <at> debbugs.gnu.org; Fri, 14 Feb 2014 09:19:21 -0500
Received: from mail-ob0-f169.google.com ([209.85.214.169]:53751)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WEJbp-0003Uu-Kg
 for 16745 <at> debbugs.gnu.org; Fri, 14 Feb 2014 09:19:18 -0500
Received: by mail-ob0-f169.google.com with SMTP id wo20so14056561obc.28
 for <16745 <at> debbugs.gnu.org>; Fri, 14 Feb 2014 06:19:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=fic+h/Cr8kl+XUhmE7XeukOEubrG1JaeIEutDstpfNE=;
 b=A9aUKxGCn7D0kCcgXAC4/7Ftr9Xua1MPHjAyMFqsFFzc1M0PMaxJLl7vqLczsstaaW
 LzHipNYnLzQu4ETe9vmQ6/Mfv0p7WIVUE1uzvPxLx0mRHo34R1BhCFYAryhCznS15U1w
 EsaqMV8+7YZGkU8Ae50AB/lIy7NrTAtCXhphmUZBUpz2GYWuKBzbmM3DQrlUnIUPt2yz
 f4f7dYOwj1jV+lWzu0ygdQuc3AtMzeuO93p2a9KioZfq3JXJfAnwTCQIPPB3jSRf3bB1
 qG93a0Xg8fJ2gC5c0cyB9p28y0fgMjtPDCW6f24ElOWCSL/kga1MExZkOIQCGxe6bFVp
 joGQ==
MIME-Version: 1.0
X-Received: by 10.182.142.37 with SMTP id rt5mr564843obb.76.1392387551827;
 Fri, 14 Feb 2014 06:19:11 -0800 (PST)
Received: by 10.76.21.84 with HTTP; Fri, 14 Feb 2014 06:19:11 -0800 (PST)
In-Reply-To: <87vbwi82ly.fsf@HIDDEN>
References: <CAFM41H16FKvKi3dhAHDbHc-iysfLDCjO-xAOGf0uC2Td5oopQw@HIDDEN>
 <87vbwi82ly.fsf@HIDDEN>
Date: Fri, 14 Feb 2014 09:19:11 -0500
Message-ID: <CAFM41H1TVP19VOx6OQ=x15fQi3Gi92s5fz0URqzbAeJZbbEdJg@HIDDEN>
Subject: Re: bug#16745: Can't send SIGTSTP from Emacs through GDB
From: Barry OReilly <gundaetiapo@HIDDEN>
To: Andreas Schwab <schwab@HIDDEN>
Content-Type: multipart/alternative; boundary=001a11c2ec9a6a9fd604f25e7d86
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16745
Cc: 16745 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a11c2ec9a6a9fd604f25e7d86
Content-Type: text/plain; charset=ISO-8859-1

Thanks, just tried gud-gdb and it works well. Actually, the windowing
behavior is saner than when using gdb, so I think I'll prefer gud-gdb.

--001a11c2ec9a6a9fd604f25e7d86
Content-Type: text/html; charset=ISO-8859-1

<div dir="ltr">Thanks, just tried gud-gdb and it works well. Actually, the windowing<br>behavior is saner than when using gdb, so I think I&#39;ll prefer gud-gdb.<br><br></div>

--001a11c2ec9a6a9fd604f25e7d86--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16745; Package emacs. Full text available.

Message received at 16745 <at> debbugs.gnu.org:


Received: (at 16745) by debbugs.gnu.org; 14 Feb 2014 13:01:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 14 08:01:26 2014
Received: from localhost ([127.0.0.1]:51825 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WEIOU-00017q-1T
	for submit <at> debbugs.gnu.org; Fri, 14 Feb 2014 08:01:26 -0500
Received: from mail-we0-f173.google.com ([74.125.82.173]:40271)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <daimrod@HIDDEN>) id 1WEIOS-00017Y-DR
 for 16745 <at> debbugs.gnu.org; Fri, 14 Feb 2014 08:01:25 -0500
Received: by mail-we0-f173.google.com with SMTP id x48so3007353wes.4
 for <16745 <at> debbugs.gnu.org>; Fri, 14 Feb 2014 05:01:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-type:content-transfer-encoding;
 bh=xuYI034PWFcl1uz54WyyrJPLO8ZcWxNGPQLYncVWWio=;
 b=DEPIpNY56PkDQL3dnzwpS0eSRqlZh+EhnKGTCZgtIwsVGwvT/mSXEDPuPRiJRlQvRw
 iJMzlhgVzy343qcTqQ8Tj/4DpWFkJyubCb7MvpdFOaByrqkuVq774HO0EMZHj+KJl3Lu
 Qtv7vRiIliE8f25a7ctOgURomc3WHOA6hWHXdVj1BDAePcAnXCwyOy/i8Z5kxaDC+Bo9
 hln5HtR7/XWrJv2+/tH0avxPdIlfZlGIYPGRYmb6Fzy1637ugyGyuANgf/mInJVMgq/F
 nJBXlbuSzbCRr9Zby2TufoCalZHnap7wp5pm3i8IFMbjmJR238psGNOopirMEzNOBm2v
 FftQ==
X-Received: by 10.180.25.46 with SMTP id z14mr2110515wif.49.1392382878489;
 Fri, 14 Feb 2014 05:01:18 -0800 (PST)
Received: from localhost (reverse-177-95.fdn.fr. [80.67.177.95])
 by mx.google.com with ESMTPSA id pm2sm4841204wic.0.2014.02.14.05.01.17
 for <multiple recipients>
 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
 Fri, 14 Feb 2014 05:01:17 -0800 (PST)
From: Daimrod <daimrod@HIDDEN>
To: Barry OReilly <gundaetiapo@HIDDEN>
Subject: Re: bug#16745: Can't send SIGTSTP from Emacs through GDB
References: <CAFM41H16FKvKi3dhAHDbHc-iysfLDCjO-xAOGf0uC2Td5oopQw@HIDDEN>
Date: Fri, 14 Feb 2014 14:11:12 +0100
In-Reply-To: <CAFM41H16FKvKi3dhAHDbHc-iysfLDCjO-xAOGf0uC2Td5oopQw@HIDDEN>
 (Barry OReilly's message of "Thu, 13 Feb 2014 14:33:14 -0500")
Message-ID: <87txc1261b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16745
Cc: 16745 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Barry OReilly <gundaetiapo@HIDDEN> writes:
Hi,

> When running GDB in Emacs and sending SIGTSTP via C-c C-z to another
> Emacs ran under GDB, the Emacs under GDB does not appear to receive
> the SIGTSTP.
>
> Recipe:
>
> =C2=A0 ./src/emacs -Q
> =C2=A0 M-x gdb
> =C2=A0 gdb -i=3Dmi src/emacs
> =C2=A0 run -Q
> =C2=A0 C-c C-z
> =C2=A0 [The Emacs under GDB is not stopped.]

I use the following workaround:
1. switch to the buffer *input/output of <program>*
2. C-q C-z RET

--=20
Daimrod/Greg




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16745; Package emacs. Full text available.

Message received at 16745 <at> debbugs.gnu.org:


Received: (at 16745) by debbugs.gnu.org; 14 Feb 2014 09:28:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 14 04:28:46 2014
Received: from localhost ([127.0.0.1]:51597 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WEF4g-00023L-0F
	for submit <at> debbugs.gnu.org; Fri, 14 Feb 2014 04:28:46 -0500
Received: from mail-out.m-online.net ([212.18.0.9]:54105)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <whitebox@HIDDEN>) id 1WEF4e-00023C-6M
 for 16745 <at> debbugs.gnu.org; Fri, 14 Feb 2014 04:28:45 -0500
Received: from frontend1.mail.m-online.net (unknown [192.168.8.180])
 by mail-out.m-online.net (Postfix) with ESMTP id 3fQTmW0139z4KK30;
 Fri, 14 Feb 2014 10:28:42 +0100 (CET)
Received: from localhost (dynscan1.mnet-online.de [192.168.6.68])
 by mail.m-online.net (Postfix) with ESMTP id 3fQTmV65qTzbbgy;
 Fri, 14 Feb 2014 10:28:42 +0100 (CET)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.180])
 by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new,
 port 10024)
 with ESMTP id qQ0SnqxuLxek; Fri, 14 Feb 2014 10:28:42 +0100 (CET)
X-Auth-Info: egY1GCfaek621u84ab38Nvi3JaA3U2YAyEcF1UIUU84=
Received: from igel.home (ppp-88-217-32-146.dynamic.mnet-online.de
 [88.217.32.146]) by mail.mnet-online.de (Postfix) with ESMTPA;
 Fri, 14 Feb 2014 10:28:42 +0100 (CET)
Received: by igel.home (Postfix, from userid 1000)
 id E2CBD2C0150; Fri, 14 Feb 2014 10:28:41 +0100 (CET)
From: Andreas Schwab <schwab@HIDDEN>
To: Barry OReilly <gundaetiapo@HIDDEN>
Subject: Re: bug#16745: Can't send SIGTSTP from Emacs through GDB
References: <CAFM41H16FKvKi3dhAHDbHc-iysfLDCjO-xAOGf0uC2Td5oopQw@HIDDEN>
X-Yow: Yow!!  That's a GOOD IDEA!!  Eating a whole FIELD of COUGH MEDICINE
 should make you feel MUCH BETTER!!
Date: Fri, 14 Feb 2014 10:28:41 +0100
In-Reply-To: <CAFM41H16FKvKi3dhAHDbHc-iysfLDCjO-xAOGf0uC2Td5oopQw@HIDDEN>
 (Barry OReilly's message of "Thu, 13 Feb 2014 14:33:14 -0500")
Message-ID: <87vbwi82ly.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 16745
Cc: 16745 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Barry OReilly <gundaetiapo@HIDDEN> writes:

> When running GDB in Emacs and sending SIGTSTP via C-c C-z to another
> Emacs ran under GDB, the Emacs under GDB does not appear to receive
> the SIGTSTP.
>
> Recipe:
>
>   ./src/emacs -Q
>   M-x gdb
>   gdb -i=mi src/emacs
>   run -Q
>   C-c C-z
>   [The Emacs under GDB is not stopped.]

Here the signal is sent to terminal process group associated with the
gdb command buffer, which includes the gdb process, but not the inferior
(which runs in its own pty).

> However, when I run GDB from the shell rather than from Emacs:
>
>   gdb src/emacs
>   run -Q
>   C-z
>   [The Emacs under GDB stopped.]

Here the terminal sends the signal to the foreground process group,
which includes the inferior (and not gdb).

This problem does not appear with the traditional gdb interface, since
it closely resembles the shell setup.  I recommend using gud-gdb
instead.

Andreas.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16745; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Feb 2014 19:33:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 13 14:33:31 2014
Received: from localhost ([127.0.0.1]:51179 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WE22M-00010z-Ek
	for submit <at> debbugs.gnu.org; Thu, 13 Feb 2014 14:33:31 -0500
Received: from eggs.gnu.org ([208.118.235.92]:49772)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WE22K-00010j-DH
 for submit <at> debbugs.gnu.org; Thu, 13 Feb 2014 14:33:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WE22E-0007GO-8w
 for submit <at> debbugs.gnu.org; Thu, 13 Feb 2014 14:33:23 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
 HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:51122)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WE22E-0007GK-5m
 for submit <at> debbugs.gnu.org; Thu, 13 Feb 2014 14:33:22 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51475)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WE22A-0001m6-1T
 for bug-gnu-emacs@HIDDEN; Thu, 13 Feb 2014 14:33:22 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WE228-0007Ec-Ek
 for bug-gnu-emacs@HIDDEN; Thu, 13 Feb 2014 14:33:17 -0500
Received: from mail-ob0-x236.google.com ([2607:f8b0:4003:c01::236]:55829)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WE228-0007EV-7y
 for bug-gnu-emacs@HIDDEN; Thu, 13 Feb 2014 14:33:16 -0500
Received: by mail-ob0-f182.google.com with SMTP id wm4so12772720obc.13
 for <bug-gnu-emacs@HIDDEN>; Thu, 13 Feb 2014 11:33:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:date:message-id:subject:from:to:content-type;
 bh=sMefSKJwP5AbRrWI3YyBsvQ4V7+9xj3Zn8SAm74IUcQ=;
 b=em9UxVYcdhG5rOF/5xzwGmF7LdyZQEjlEOF8cKEWMUTFs0ptbH+9tbLRU3r4k7SrUF
 KiEj29dUgtv2rVAH75pdFSbeBIDXyUBlDW+SkIc08LM66KHHYhObMVTKyKIjSs3WPpS3
 P4dNRXvgE69Hp9/n2P5EJ48MgGXGAtaihkGP3t7S80m1ixenxiiCr4NAbK75FFU0Kd9o
 GAPDQcvSmvTvN1ESYcpE2xZH2732X9N1wEj4HDZ8AGKNyBUfnKFHTC2uWtq61b2Qr4ea
 riPNgyYygnM/UGL3X5l+FwbivS80wj+7y94qIqEi4iIp2JC2YmsLoNRSwArC42xGSly+
 CxNg==
MIME-Version: 1.0
X-Received: by 10.60.45.105 with SMTP id l9mr2626292oem.53.1392319995093; Thu,
 13 Feb 2014 11:33:15 -0800 (PST)
Received: by 10.76.21.84 with HTTP; Thu, 13 Feb 2014 11:33:14 -0800 (PST)
Date: Thu, 13 Feb 2014 14:33:14 -0500
Message-ID: <CAFM41H16FKvKi3dhAHDbHc-iysfLDCjO-xAOGf0uC2Td5oopQw@HIDDEN>
Subject: Can't send SIGTSTP from Emacs through GDB
From: Barry OReilly <gundaetiapo@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary=089e0149ce3cb9415904f24ec224
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.17
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--089e0149ce3cb9415904f24ec224
Content-Type: text/plain; charset=ISO-8859-1

When running GDB in Emacs and sending SIGTSTP via C-c C-z to another
Emacs ran under GDB, the Emacs under GDB does not appear to receive
the SIGTSTP.

Recipe:

  ./src/emacs -Q
  M-x gdb
  gdb -i=mi src/emacs
  run -Q
  C-c C-z
  [The Emacs under GDB is not stopped.]

However, when I run GDB from the shell rather than from Emacs:

  gdb src/emacs
  run -Q
  C-z
  [The Emacs under GDB stopped.]

I noticed src/.gdbinit has line:

  handle SIGTSTP nopass

So I tried with and without this to no effect.

When I run with these debug statements:

diff --git a/src/process.c b/src/process.c
index 85470b6..176de75 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5753,6 +5753,9 @@ process_send_signal (Lisp_Object process, int signo,
Lisp_Object current_group,
 #else
          sig_char = &t.c_cc[VSUSP];
 #endif
+          { struct timespec debug_ts; char debug_dateStr[20]; {
clock_gettime(CLOCK_REALTIME, &debug_ts); struct tm mytm;
localtime_r(&debug_ts.tv_sec, &mytm); strftime(debug_dateStr, 20,
"%Y-%m-%dT%H:%M:%S", &mytm); }
+               printf( "%s.%09ld|pid:%d|tid:%ld|%s|%d| DEBUG:
sig_char=%02x\n", // TODO: debugging
+                                 debug_dateStr, debug_ts.tv_nsec,
getpid(), pthread_self(), __FILE__, __LINE__, *sig_char ); fflush(stdout); }
          break;
        }

@@ -5901,6 +5904,9 @@ traffic.  */)
 #ifndef SIGTSTP
   error ("No SIGTSTP support");
 #else
+  { struct timespec debug_ts; char debug_dateStr[20]; {
clock_gettime(CLOCK_REALTIME, &debug_ts); struct tm mytm;
localtime_r(&debug_ts.tv_sec, &mytm); strftime(debug_dateStr, 20,
"%Y-%m-%dT%H:%M:%S", &mytm); }
+       printf( "%s.%09ld|pid:%d|tid:%ld|%s|%d| DEBUG: Send SIGTSTP\n", //
TODO: debugging
+                         debug_dateStr, debug_ts.tv_nsec, getpid(),
pthread_self(), __FILE__, __LINE__ ); fflush(stdout); }
   process_send_signal (process, SIGTSTP, current_group, 0);
 #endif
   return process;

The output during the ill recipe is:

2014-02-13T14:11:49.438466000|pid:22430|tid:47532927609088|process.c|5909|
DEBUG: Send SIGTSTP
2014-02-13T14:11:49.438547000|pid:22430|tid:47532927609088|process.c|5758|
DEBUG: sig_char=1a

So the signal is being sent it seems. What might be the obstruction?

I am on RHEL 5, using latest Emacs from trunk and GDB 7.1.

--089e0149ce3cb9415904f24ec224
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>When running GDB in Emacs and sending SIGTSTP via C-c=
 C-z to another<br>Emacs ran under GDB, the Emacs under GDB does not appear=
 to receive<br>the SIGTSTP.<br><br>Recipe:<br><br>=A0 ./src/emacs -Q<br>=A0=
 M-x gdb<br>
=A0 gdb -i=3Dmi src/emacs<br>=A0 run -Q<br>=A0 C-c C-z<br>=A0 [The Emacs un=
der GDB is not stopped.]<br><br>However, when I run GDB from the shell rath=
er than from Emacs:<br><br>=A0 gdb src/emacs<br>=A0 run -Q<br>=A0 C-z<br>=
=A0 [The Emacs under GDB stopped.]<br>
<br>I noticed src/.gdbinit has line:<br><br>=A0 handle SIGTSTP nopass<br><b=
r>So I tried with and without this to no effect.<br><br>When I run with the=
se debug statements:<br><br>diff --git a/src/process.c b/src/process.c<br>
index 85470b6..176de75 100644<br>--- a/src/process.c<br>+++ b/src/process.c=
<br>@@ -5753,6 +5753,9 @@ process_send_signal (Lisp_Object process, int sig=
no, Lisp_Object current_group,<br>=A0#else<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0 s=
ig_char =3D &amp;t.c_cc[VSUSP];<br>
=A0#endif<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0 { struct timespec debug_ts; char =
debug_dateStr[20]; { clock_gettime(CLOCK_REALTIME, &amp;debug_ts); struct t=
m mytm; localtime_r(&amp;debug_ts.tv_sec, &amp;mytm); strftime(debug_dateSt=
r, 20, &quot;%Y-%m-%dT%H:%M:%S&quot;, &amp;mytm); }<br>
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 printf( &quot;%s.%09ld|pid:%d|t=
id:%ld|%s|%d| DEBUG: sig_char=3D%02x\n&quot;, // TODO: debugging<br>+=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 debug_dateStr, debug_ts.tv_nsec, getpid(), pthread_self(), =
__FILE__, __LINE__, *sig_char ); fflush(stdout); }<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0 break;<br>=A0=A0=A0=A0=A0=A0=A0 }<br>=A0<br>@@ =
-5901,6 +5904,9 @@ traffic.=A0 */)<br>=A0#ifndef SIGTSTP<br>=A0=A0 error (&=
quot;No SIGTSTP support&quot;);<br>=A0#else<br>+=A0 { struct timespec debug=
_ts; char debug_dateStr[20]; { clock_gettime(CLOCK_REALTIME, &amp;debug_ts)=
; struct tm mytm; localtime_r(&amp;debug_ts.tv_sec, &amp;mytm); strftime(de=
bug_dateStr, 20, &quot;%Y-%m-%dT%H:%M:%S&quot;, &amp;mytm); }<br>
+=A0=A0=A0=A0=A0=A0 printf( &quot;%s.%09ld|pid:%d|tid:%ld|%s|%d| DEBUG: Sen=
d SIGTSTP\n&quot;, // TODO: debugging<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 debug_dateStr, debug_ts.tv_nsec, ge=
tpid(), pthread_self(), __FILE__, __LINE__ ); fflush(stdout); }<br>
=A0=A0 process_send_signal (process, SIGTSTP, current_group, 0);<br>=A0#end=
if<br>=A0=A0 return process;<br><br>The output during the ill recipe is:<br=
><br>2014-02-13T14:11:49.438466000|pid:22430|tid:47532927609088|process.c|5=
909| DEBUG: Send SIGTSTP<br>
2014-02-13T14:11:49.438547000|pid:22430|tid:47532927609088|process.c|5758| =
DEBUG: sig_char=3D1a<br><br>So the signal is being sent it seems. What migh=
t be the obstruction?<br><br></div>I am on RHEL 5, using latest Emacs from =
trunk and GDB 7.1.<br>
<br></div>

--089e0149ce3cb9415904f24ec224--




Acknowledgement sent to Barry OReilly <gundaetiapo@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#16745; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 8 Jun 2016 03:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.