Debian Bug report logs - #348457
open ttydev: No such device or address ; xterm should call TIOCSCTTY on GNU systems

version graph

Package: xterm; Maintainer for xterm is Debian X Strike Force <debian-x@lists.debian.org>; Source for xterm is src:xterm.

Reported by: Samuel Thibault <samuel.thibault@ens-lyon.org>

Date: Tue, 17 Jan 2006 03:18:04 UTC

Severity: important

Tags: patch, upstream

Found in version xterm/208-2

Fixed in version xterm/210-1

Done: David Nusinow <dnusinow@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#348457; Package xterm. Full text and rfc822 format available.

Acknowledgement sent to Samuel Thibault <samuel.thibault@ens-lyon.org>:
New Bug report received and forwarded. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: open ttydev: No such device or address ; xterm should call TIOCSCTTY on GNU systems
Date: Tue, 17 Jan 2006 03:50:18 +0100
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



Tags added: upstream Request was from Samuel Thibault <samuel.thibault@ens-lyon.org> to control@bugs.debian.org. Full text and rfc822 format available.

Severity set to `important'. Request was from Samuel Thibault <samuel.thibault@ens-lyon.org> to control@bugs.debian.org. Full text and rfc822 format available.

Tags added: upstream Request was from Samuel Thibault <samuel.thibault@ens-lyon.org> to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to David Nusinow <dnusinow@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Samuel Thibault <samuel.thibault@ens-lyon.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #16 received at 348457-close@bugs.debian.org (full text, mbox):

From: David Nusinow <dnusinow@debian.org>
To: 348457-close@bugs.debian.org
Subject: Bug#348457: fixed in xterm 210-1
Date: Mon, 13 Mar 2006 21:37:47 -0800
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-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 26 Jun 2007 00:21:43 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 02:27:42 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.