From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Quanah Gibson-Mount Newsgroups: gmane.emacs.bugs Subject: Re: Emacs 22.0.50 and suspending while logged into another system Date: Mon, 16 Oct 2006 15:30:52 -0700 Message-ID: <3243FAAFCFB33E8C91939813@deus-ex.stanford.edu> References: <8280DD5F2B999CA0254744A3@SW-90-717-287-3.stanford.edu> <4F415D926268CBCF51A50DCF@deus-ex.stanford.edu> <1E5FB7317D3446621F967468@SW-90-717-287-3.stanford.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1161037906 14886 80.91.229.2 (16 Oct 2006 22:31:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Oct 2006 22:31:46 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 17 00:31:44 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GZazc-0000Qk-KN for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Oct 2006 00:31:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZaza-00081m-Mz for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Oct 2006 18:31:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GZazA-0007rR-Lb for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2006 18:31:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GZaz6-0007oh-SB for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2006 18:31:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZaz6-0007oe-Kd for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2006 18:31:00 -0400 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GZb8H-0006Tp-Ld; Mon, 16 Oct 2006 18:40:29 -0400 Original-Received: from [171.67.22.28] (helo=smtp1.stanford.edu) by mx20.gnu.org with esmtp (Exim 4.52) id 1GZaz2-0008Ac-Gh; Mon, 16 Oct 2006 18:30:56 -0400 Original-Received: from smtp1.stanford.edu (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id B8B614C238; Mon, 16 Oct 2006 15:30:53 -0700 (PDT) Original-Received: from deus-ex.stanford.edu (tribes2.Stanford.EDU [171.64.19.81]) by smtp1.stanford.edu (Postfix) with ESMTP id D0AD34C26B; Mon, 16 Oct 2006 15:30:52 -0700 (PDT) Original-To: rms@gnu.org In-Reply-To: X-Mailer: Mulberry/4.0.5 (Win32) Content-Disposition: inline X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15376 Archived-At: --On Sunday, October 15, 2006 12:20 AM -0400 Richard Stallman wrote: > In any case, you now have the information on what "tty" contained > after it exited from EMACS_SET_TTY, and I'll leave it up to you and > the other developers to decide whether or not that data was 'bad' or > not. > > Did you examine that value just before the failure? > That is, did it fail just after this call to init_sys_modes? > init_sys_modes will be called each time you resume Emacs after > suspending; the time that we need to see the value > is the time that it fails. > > It would be good to see the value of tty after EMACS_SET_TTY, > and the value of old_tty too. Hi Richard, I set up the following in gdb: l sysdep.c:1637 break 1637 (this is the line after EMACS_SET_TTY is called in the source I have). Then, I run -nw Then use control-Z to suspend. This *usually* then breaks at line 1637. If this is where the break occurs, everything continues to work as desired. However, sometimes it breaks in _libc_kill instead, completely bypassing EMACS_SET_TTY. After this, things don't work correctly. So it appears that the same logic is not always being followed when a SIGTSTP is caught. The usual path I get is: (control-Z): Breakpoint 1, init_sys_modes () at sysdep.c:1642 1642 if (!flow_control) ioctl (input_fd, TCXONC, 1); (gdb) cont Program received signal SIGTSTP, Stopped (user). 0xfe6990cc in _poll () from /usr/lib/libc.so.1 (gdb) Then I issue "signal SIGCONT" to resume. On the other path: (control-Z): Program received signal SIGTSTP, Stopped (user). 0xfe69b638 in _libc_kill () from /usr/lib/libc.so.1 I tried "step"ing from here, but it just hangs forever, without entering init_sys_modes. I can reproduce this very easily. If I give a "signal SIGCONT" here, then it'll let me back into emacs. --Quanah -- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html