From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Svante Signell Newsgroups: gmane.emacs.bugs Subject: bug#8451: 23.2.1 fails to start on GNU/Hurd due to bogus code in term.c Date: Fri, 08 Apr 2011 14:54:32 +0200 Organization: Hemma Message-ID: <1302267272.32453.194.camel@s1499.it.kth.se> Reply-To: svante.signell@telia.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1302281231 10388 80.91.229.12 (8 Apr 2011 16:47:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Apr 2011 16:47:11 +0000 (UTC) To: 8451@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 08 18:47:05 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q8Eps-0001vG-1j for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Apr 2011 18:47:04 +0200 Original-Received: from localhost ([127.0.0.1]:56434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8Epr-0004cw-4r for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Apr 2011 12:47:03 -0400 Original-Received: from [140.186.70.92] (port=37543 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8EhV-0001ak-FL for bug-gnu-emacs@gnu.org; Fri, 08 Apr 2011 12:38:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q8EhU-0004Lt-CL for bug-gnu-emacs@gnu.org; Fri, 08 Apr 2011 12:38:25 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q8EhU-0004Ln-7m for bug-gnu-emacs@gnu.org; Fri, 08 Apr 2011 12:38:24 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q8ENm-0003vZ-Ku; Fri, 08 Apr 2011 12:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Svante Signell Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Apr 2011 16:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8451 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.130227943015035 (code B ref -1); Fri, 08 Apr 2011 16:18:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Apr 2011 16:17:10 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q8EMw-0003uS-E0 for submit@debbugs.gnu.org; Fri, 08 Apr 2011 12:17:10 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q8BD2-0007jB-Aw for submit@debbugs.gnu.org; Fri, 08 Apr 2011 08:54:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q8BCw-0007lF-PY for submit@debbugs.gnu.org; Fri, 08 Apr 2011 08:54:39 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:58583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q8BCw-0007lB-NK for submit@debbugs.gnu.org; Fri, 08 Apr 2011 08:54:38 -0400 Original-Received: from [140.186.70.92] (port=51600 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8BCv-0001xi-8f for bug-gnu-emacs@gnu.org; Fri, 08 Apr 2011 08:54:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q8BCt-0007jr-0G for bug-gnu-emacs@gnu.org; Fri, 08 Apr 2011 08:54:37 -0400 Original-Received: from smtp-out12.han.skanova.net ([195.67.226.212]:60940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q8BCs-0007iz-MM for bug-gnu-emacs@gnu.org; Fri, 08 Apr 2011 08:54:34 -0400 Original-Received: from [130.237.20.66] (130.237.20.66) by smtp-out12.han.skanova.net (8.5.133) (authenticated as u84406617) id 4D65154400D428EE; Fri, 8 Apr 2011 14:54:32 +0200 X-Mailer: Evolution 2.32.2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Fri, 08 Apr 2011 12:17:09 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 08 Apr 2011 12:18:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Fri, 08 Apr 2011 12:41:17 -0400 X-BeenThere: bug-gnu-emacs@gnu.org 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:45692 Archived-At: Package: emacs Version: 23.2+1-7 Severity: Important Tags: patch Usertags: hurd Starting Debian emacs 23.2+1-7 in non-window system mode on GNU/Hurd fails due to bogus code: #:~ emacs -nw emacs: Not a tty device: /dev/tty src/term.c: #ifdef O_IGNORE_CTTY if (!ctty) /* Open the terminal device. Don't recognize it as our controlling terminal, and don't make it the controlling tty if we don't have one at the moment. */ fd = emacs_open (name, O_RDWR | O_IGNORE_CTTY | O_NOCTTY, 0); else #else /* Alas, O_IGNORE_CTTY is a GNU extension that seems to be only defined on Hurd. On other systems, we need to explicitly dissociate ourselves from the controlling tty when we want to open a frame on the same terminal. */ fd = emacs_open (name, O_RDWR | O_NOCTTY, 0); #endif /* O_IGNORE_CTTY */ tty->name = xstrdup (name); When O_IGNORE_CTTY is defined (which is the case only on GNU/Hurd...), the else branch is actually tty->name = xstrdup(name); ... The obvious fix is attached (provided by Samuel Thibault) --- src/term.c.orig 2011-01-20 02:14:50.000000000 +0100 +++ src/term.c 2011-01-20 02:15:43.000000000 +0100 @@ -3428,13 +3428,12 @@ init_tty (char *name, char *terminal_typ if we don't have one at the moment. */ fd = emacs_open (name, O_RDWR | O_IGNORE_CTTY | O_NOCTTY, 0); else -#else +#endif /* O_IGNORE_CTTY */ /* Alas, O_IGNORE_CTTY is a GNU extension that seems to be only defined on Hurd. On other systems, we need to explicitly dissociate ourselves from the controlling tty when we want to open a frame on the same terminal. */ fd = emacs_open (name, O_RDWR | O_NOCTTY, 0); -#endif /* O_IGNORE_CTTY */ tty->name = xstrdup (name); terminal->name = xstrdup (name); Is this fixed in 23.3 already? FYI: Emacs still does not work when editing a directory in non-window mode or in X. GNU Emacs 23.2.1 (i486-pc-gnu) of 2011-01-20 on kvm-hurd, modified by Debian