pseudo-terminal masters
Bill McGonigle
bill at bfccomputing.com
Tue Jan 13 16:45:31 EST 2009
Hi, all,
Anybody familiar with the pseudoterminal setup on linux?
I've got some scripts which look for idle time on connections. They're
currently using the output of 'w' which I see now is really just
reporting the last modified date of /dev/pts/x, so I can throw out the
'w' parsing.
However, /dev/pts/x's modification date depends on data written to the
terminal by the system (for lack of better terms). What I actually want
is to figure out idle time based on input by the user.
On some other unixes there are /dev/ptm/x which represents this, but in
linux, apparently you open /dev/ptmx which returns to you a filehandle
for a new ptm, but I'm not sure how to find that from userspace.
If I knew what I was looking for I wouldn't mind implementing a wrapper
in c, but I'm not sure where to look.
Thanks,
-Bill
--
Bill McGonigle, Owner Work: 603.448.4440
BFC Computing, LLC Home: 603.448.1668
bill at bfccomputing.com Cell: 603.252.2606
http://www.bfccomputing.com/ Page: 603.442.1833
Blog: http://blog.bfccomputing.com/
VCard: http://bfccomputing.com/vcard/bill.vcf
More information about the gnhlug-discuss
mailing list