all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Svante Signell <svante.signell@telia.com>
To: 8451@debbugs.gnu.org
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	[thread overview]
Message-ID: <1302267272.32453.194.camel@s1499.it.kth.se> (raw)

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








                 reply	other threads:[~2011-04-08 12:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1302267272.32453.194.camel@s1499.it.kth.se \
    --to=svante.signell@telia.com \
    --cc=8451@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.