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

Bug#682972: ttyname() (and /bin/tty) on /dev/tty return "/dev/tty"



Package: libc6
Version: 2.11.2-10

ttyname() should return the name of the tty device in a form than can
be used by other processes (with different controlling terminals) to
open it.

Steps to reproduce:

  $ perl -e 'use POSIX; printf "%s\n", ttyname(STDIN)'
  /dev/pts/117
  $ perl -e 'use POSIX; printf "%s\n", ttyname(STDIN)' </dev/tty
  /dev/tty
  $ tty
  /dev/pts/117
  $ tty </dev/tty
  /dev/tty
  $

Expected output: in a normal xterm or ssh session, `tty </dev/tty'
should produce the same output as `tty'.

Thanks,
Ian.


Reply to: