mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Albert Cahalan" <acahalan@gmail.com>
To: "Jan Engelhardt" <jengelh@linux01.gwdg.de>
Cc: ray-gmail@madrabbit.org, "Jon Smirl" <jonsmirl@gmail.com>,
	"Greg KH" <greg@kroah.com>,
	alan@lxorguk.ukuu.org.uk, efault@gmx.de,
	linux-kernel@vger.kernel.org
Subject: Re: Opinions on removing /proc/tty?
Date: Mon, 10 Jul 2006 21:07:46 -0400	[thread overview]
Message-ID: <787b0d920607101807j2804023v17f7643bffeb2456@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0607110015030.5420@yvahk01.tjqt.qr>

On 7/10/06, Jan Engelhardt <jengelh@linux01.gwdg.de> wrote:
> >> > Just do /proc/*/tty links and all will be good. This even
> >> > handles the case of two different names for the same dev_t.
> >> >
> >> Is this for the controlling tty? Then it should be ctty.
> >
> > Eeeew, an extra byte so it can look ugly.
> > What other special tty is there?
> >
> Any fd, for that matter.
>
> 00:09 shanghai:/dev/shm > ls -l /proc/$$/fd
> total 4
> dr-x------  2 jengelh users  0 Jul 11 00:16 .
> dr-xr-xr-x  5 jengelh root   0 Jul 11 00:04 ..
> lrwx------  1 jengelh users 64 Jul 11 00:16 0 -> /dev/pts/2
> lrwx------  1 jengelh users 64 Jul 11 00:16 1 -> /dev/pts/2
> lrwx------  1 jengelh users 64 Jul 11 00:16 2 -> /dev/pts/2
> lrwx------  1 jengelh users 64 Jul 11 00:16 255 -> /dev/pts/2
> and CTTY is /dev/tty1.
>
> So what would /proc/$$/tty - ambiguous name - point to, the normal (attached)
> or the ctty? Not to mention exotic, yet possible things

The tty is obviously one and the same as:

a. "tty" in the kernel's struct signal_struct
b. the "TTY" or "TT" reported by ps.
c. what "/dev/tty" refers to

Any other tty is not "the tty". Exactly one tty is special.

On any of Linux, MacOS, Solaris, NetBSD, OpenBSD:

$ ls /dev/tty /dev/ctty
ls: /dev/ctty: No such file or directory
/dev/tty

Lord only knows why FreeBSD has both.
Unlike Linux, they don't supply a man page.
On a Linux system, "man 4 tty" is useful.
On a Solaris system, "man -s 7d tty" is useful.

  reply	other threads:[~2006-07-11  1:07 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-09  5:30 Albert Cahalan
2006-07-09 14:04 ` Jon Smirl
2006-07-09 16:23   ` Albert Cahalan
2006-07-09 17:00     ` Ray Lee
2006-07-09 17:08       ` Ray Lee
2006-07-09 19:26       ` Albert Cahalan
2006-07-09 19:31         ` Russell King
2006-07-09 19:57           ` Albert Cahalan
2006-07-10 14:02             ` Jan Engelhardt
2006-07-10 15:06               ` Albert Cahalan
2006-07-10 22:17                 ` Jan Engelhardt
2006-07-11  1:07                   ` Albert Cahalan [this message]
2006-07-11  1:48                     ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2006-07-08  2:56 Jon Smirl
2006-07-08  5:30 ` Randy.Dunlap
     [not found]   ` <9e4733910607072256q65188526uc5cb706ec3ecbaee@mail.gmail.com>
2006-07-09  5:04     ` Randy.Dunlap
     [not found]       ` <9e4733910607082220v754a000ak7e75ae4042a5e595@mail.gmail.com>
2006-07-09  5:27         ` Randy.Dunlap
2006-07-09 10:07         ` Antonino A. Daplas
     [not found]           ` <9e4733910607090645l236f17f1sb9778f0fc6c6ca01@mail.gmail.com>
2006-07-09 17:35             ` Randy.Dunlap
2006-07-09 23:31               ` Antonino A. Daplas
     [not found]                 ` <9e4733910607091744k273a7351l16abbcc6ff8c4bbd@mail.gmail.com>
2006-07-11 22:01                   ` Greg KH
     [not found]                     ` <9e4733910607111532s3fc2bb52q3f0247a9f2289d4e@mail.gmail.com>
2006-07-13 18:37                       ` Greg KH
2006-07-08  7:40 ` Mike Galbraith
2006-07-08 14:12   ` Jon Smirl
2006-07-08 14:48     ` Alan Cox
2006-07-08 16:20       ` Jon Smirl
2006-07-08 17:20         ` Russell King
2006-07-11 22:03           ` Greg KH
2006-07-08 16:12     ` Greg KH

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=787b0d920607101807j2804023v17f7643bffeb2456@mail.gmail.com \
    --to=acahalan@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=efault@gmx.de \
    --cc=greg@kroah.com \
    --cc=jengelh@linux01.gwdg.de \
    --cc=jonsmirl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ray-gmail@madrabbit.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®