[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: Build of emacs_23.2+1-7



Package: emacs23
Version: 23.2+1-7
Severity: important
Tags: patch
User: debian-hurd@lists.debian.org
Usertags: hurd

Hello,

Svante Signell, le Wed 19 Jan 2011 14:10:09 +0100, a écrit :
> After installing emacs23 when trying to start it I get the following
> error: (Googling did not give any useful.)
> (Trying both xterm from a ssh login and hurd-console)
> 
> user@kvm-hurd:~ emacs -nw
> emacs: Not a tty device: /dev/tty

There's bogus code there indeed:

#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.

> Starting emacs under X complains about GConf/D-Bus problems:
> (Trying bot xterm and rxvt)
> 
> user@kvm-hurd:~ emacs
> GConf Error: Failed to contact configuration server; the most common
> cause is a missing or misconfigured D-Bus session bus daemon. See
> http://projects.gnome.org/gconf/ for information.  (Details - 1:
> Failed to get connection to session: Did not receive a reply. Possible
> causes include: the remote application did not send a reply, the
> message bus security policy blocked the reply, the reply timeout
> expired, or the network connection was broken.)
> 
> (emacs:17248): Gdk-WARNING **: shmget failed: error 1073741826 (No
> such file or directory)

That's another matter: nobody has written an shmget implementation
yet unfortunately...

Samuel
--- 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);

Reply to: