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

Bug#348457: marked as done (open ttydev: No such device or address ; xterm should call TIOCSCTTY on GNU systems)



Your message dated Mon, 13 Mar 2006 21:37:47 -0800
with message-id <E1FJ2E7-0003SB-A9@spohr.debian.org>
and subject line Bug#348457: fixed in xterm 210-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: xterm
Version: 208-2
Severity: normal
Tags: patch

Hi,

When running xterm on GNU/Hurd systems, one gets
open ttydev: No such device or address

The problem is the way xterm sets the controlling terminal: main.c:3395:
   if ((ttyfd = open(ttydev, O_RDWR)) >= 0) {

And then xterm tries to open /dev/tty, and here it fails.

Indeed, POSIX says that
`If a session leader has no controlling terminal, and opens a terminal
device file that is not already associated with a session without using
O_NOCTTY option (see open()), it is implementation-defined whether the
terminal becomes the controlling terminal of the session leader.'

And indeed, on GNU systems, along definition of O_NOCTTY in fcntl.h one
can read ` `open' never assigns a controlling terminal in GNU. '.

So here is a proposed patch, please forward upstream.

Regards,
Samuel

--- main.c.orig	2006-01-17 04:24:50.000000000 +0100
+++ main.c	2006-01-17 04:25:08.000000000 +0100
@@ -3397,6 +3397,10 @@ spawn(void)
 			    /* make /dev/tty work */
 			    ioctl(ttyfd, TCSETCTTY, 0);
 #endif
+#if defined(__GNU__) && defined(TIOCSCTTY)
+			    /* make /dev/tty work */
+			    ioctl(ttyfd, TIOCSCTTY, 0);
+#endif
 #ifdef USE_SYSV_PGRP
 			    /* We need to make sure that we are actually
 			     * the process group leader for the pty.  If

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: hurd-i386 (i686-AT386)
Shell:  /bin/sh linked to /bin/bash
Kernel: GNU 0.3
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages xterm depends on:
ii  libc0.3                   2.3.5-7        GNU C Library: Shared libraries an
ii  libfontconfig1            2.3.2-1        generic font configuration library
ii  libfreetype6              2.1.10-1       FreeType 2 font engine, shared lib
ii  libice6                   6.9.0.dfsg.1-3 Inter-Client Exchange library
ii  libncurses5               5.5-1          Shared libraries for terminal hand
ii  libsm6                    6.9.0.dfsg.1-3 X Window System Session Management
ii  libx11-6                  6.9.0.dfsg.1-3 X Window System protocol client li
ii  libxaw8                   6.9.0.dfsg.1-3 X Athena widget set library
ii  libxext6                  6.9.0.dfsg.1-3 X Window System miscellaneous exte
ii  libxft2                   2.1.7-1        FreeType-based font drawing librar
ii  libxmu6                   6.9.0.dfsg.1-3 X Window System miscellaneous util
ii  libxpm4                   6.9.0.dfsg.1-3 X pixmap library
ii  libxrender1               1:0.9.0.2-1    X Rendering Extension client libra
ii  libxt6                    6.9.0.dfsg.1-3 X Toolkit Intrinsics
ii  xlibs-data                6.9.0.dfsg.1-3 X Window System client data
ii  zlib1g                    1:1.2.3-9      compression library - runtime

Versions of packages xterm recommends:
ii  xutils                    6.9.0.dfsg.1-3 X Window System utility programs

-- no debconf information


--- End Message ---
--- Begin Message ---
Source: xterm
Source-Version: 210-1

We believe that the bug you reported is fixed in the latest version of
xterm, which is due to be installed in the Debian FTP archive:

xterm_210-1.diff.gz
  to pool/main/x/xterm/xterm_210-1.diff.gz
xterm_210-1.dsc
  to pool/main/x/xterm/xterm_210-1.dsc
xterm_210-1_i386.deb
  to pool/main/x/xterm/xterm_210-1_i386.deb
xterm_210.orig.tar.gz
  to pool/main/x/xterm/xterm_210.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 348457@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
David Nusinow <dnusinow@debian.org> (supplier of updated xterm package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 13 Mar 2006 22:12:41 -0500
Source: xterm
Binary: xterm
Architecture: source i386
Version: 210-1
Distribution: unstable
Urgency: low
Maintainer: David Nusinow <dnusinow@debian.org>
Changed-By: David Nusinow <dnusinow@debian.org>
Description: 
 xterm      - X terminal emulator
Closes: 347415 348384 348457 350664 351425
Changes: 
 xterm (210-1) unstable; urgency=low
 .
   * New upstream release (the following are fixes immediately relevant to
     Debian. More are in the upstream changelog)
     + allow cursor to have the same color as foreground (text), since it is
       rendered as reverse (closes: #350664)
     + add TIOCSCTTY ioctl() ifdef'd for __GNU__ to set the controlling
       terminal (closes: #348457)
     + typo in manpage (closes: #351425)
     + revert the XTerm.ad change from patch #208 (closes: #348384)
     + add check to ensure that double-clicking to extend selection will not
       extend it into the scrollback area. This still allows users to scroll
       back and select text (closes: #347415)
    * Remove the 01_stolen_from_HEAD patch, as it is now obsolete
    * Switch build dependency from libxaw8-dev to libxaw7-dev
    * debian/rules clean target now calls make clean instead of distclean
    * Use dh_install's --list-missing option
    * Merge duplicate Provides fields
Files: 
 4288a33ed518cdf13dfad2f635199f88 769 x11 optional xterm_210-1.dsc
 1528b95619b21740c01addd5c9fdb4f0 761944 x11 optional xterm_210.orig.tar.gz
 2e4344fa69b5509a4304047b8e0e7c94 60615 x11 optional xterm_210-1.diff.gz
 d4cbebe84de67b0e00f915726b3718cc 390176 x11 optional xterm_210-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEFjepyLfpNdY0ad8RAm5DAJ0aQJH4bKExQcrD05yVTCozP7n0+QCdER48
Ft6vFa0Thg3Q9Iv190jYwGE=
=n1eR
-----END PGP SIGNATURE-----


--- End Message ---

Reply to: