pty question [OT]

Neal Becker (nbecker@fred.net)
Sat, 14 Jun 2003 20:25:52 -0400


I suppose this isn't exactly specific to linux kernel. I have some programs
running at work, each writing results to stdout. Each is running within a
shell within some type of xterm-like device. I want to be able to check on
the results from home.

I know if I had thought about it in advance, I could use screen, or even
xemacs/gnuclient.

I'm wondering if I can get anything by looking at /proc/pid/fd/.
For example, I'm running top and I see:

ls -l /proc/5012/fd/
total 0
lrwx------ 1 nbecker nbecker 64 Jun 14 20:24 0 -> /dev/pts/2
lrwx------ 1 nbecker nbecker 64 Jun 14 20:24 1 -> /dev/pts/2
lrwx------ 1 nbecker nbecker 64 Jun 14 20:24 2 -> /dev/pts/2
lr-x------ 1 nbecker nbecker 64 Jun 14 20:24 3 -> /proc/uptime
lr-x------ 1 nbecker nbecker 64 Jun 14 20:24 4 -> /proc/stat
lr-x------ 1 nbecker nbecker 64 Jun 14 20:24 5 -> /proc/loadavg
lr-x------ 1 nbecker nbecker 64 Jun 14 20:24 6 -> /proc/meminfo

I guess the problem is I can't find any documentation on devpts. Maybe if I
could find some I'd be able to figure out a device I could open to peek at
the stdout of a process?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/