lkml.org 
[lkml]   [2001]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: tty->name conversion?
On Fri, Jul 13, 2001 at 01:43:16PM -0400, Albert D. Cahalan wrote:
> Taral writes:
>
> > I noticed that ps still relies on device numbers to determine tty, since
> > /proc/*/stat only exports the device number. Is there any way to get the
> > device name? I noticed that it is not present in tty_struct anywhere
> > (proc_pid_stat() uses task->tty->device, which is a kdev_t).
> >
> > This would be useful to consider if we ever intend to create real
> > unnumbered character/block devices.
>
> This isn't quite true, at least for the version shipped with Debian.

<snip>

Thanks for your reply. It still remains, however, that for processes
that you do not own, it has to guess, viz:

319 taral vc/1 S Jul12 -zsh
320 root tty2 S Jul12 /sbin/getty 38400 vc/2

Notice that the getty is listed as tty2, even though it opened
/dev/vc/2.

--
Taral <taral@taral.net>
This message is digitally signed. Please PGP encrypt mail to me.
"Any technology, no matter how primitive, is magic to those who don't
understand it." -- Florence Ambrose
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 12:57    [W:0.054 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site