[oclug] how to get a process's tty

Roger Messier en916 at ncf.ca
Thu Apr 8 23:38:01 EDT 2004


On Thu, 08 Apr 2004 22:14:32 -0400 Patrick Smith <patsmith at pobox.com>
wrote:
> 
> It looks to me that the "tty number" is actually a 2 byte value 
> containing the major and minor device numbers.  I don't *know* this is
> always the case, but it seems to be true in at least one case.  :-) 
> You might want to do some research to verify this before depending on
> it. (Might it actually contain four one byte numbers, the first two of
> which are 0 here?  I believe I'm not up to date on Linux device
> numbering.)

Hmm, the man page for proc doesn't give any details about the tty
number, and the man page for stat doesn't give any details about st_rdev
which I'm currently comparing against.  I'll see if google turns up
anything.

Thanks.
-- 
Roger Messier
Email: en916 at ncf.ca
Jabber ID: rogerm at nureality.ca
PGP KeyID (pgp.mit.edu): 1827131D
Blessed are they who can laugh at themselves,
for they shall never cease to be amused.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://tux.oclug.on.ca/pipermail/oclug/attachments/20040408/a6cf8345/attachment.bin


More information about the OCLUG mailing list