[oclug] how to get a process's tty
en916 at ncf.ca
Thu Apr 8 23:24:24 EDT 2004
On Thu, 08 Apr 2004 21:55:04 -0400 "Francis J. A. Pinteric"
<fja at linuxdoctor.biz> wrote:
> Look at the /proc/<pid>/fd directory. Using an `ls -l' command on that
> directory will give you all the file descriptors used by that process.
> I'll leave it as an exercise for the reader to extract the device
> It's easy to write a shell script at this point.
Thanks Francis, but since my program runs with my uid, that doesn't work
for processes owned by users other than me. The program doesn't have
read permissions for processes owned by other users.
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
Size: 189 bytes
Desc: not available
Url : http://tux.oclug.on.ca/pipermail/oclug/attachments/20040408/4b4a23d1/attachment.bin
More information about the OCLUG