![]() |
|
|
|
|
|||||||
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to get capture input events from keyboard and mouse | yhacks | High Level Programming | 4 | 05-26-2008 04:31 AM |
| Detecting Keyboard Input without return | ravneetd | High Level Programming | 4 | 05-10-2007 04:58 AM |
| Don't show keyboard input on terminal | marianor31 | Shell Programming and Scripting | 1 | 03-23-2007 02:54 PM |
| suppressing keyboard input | anthreedhr | Shell Programming and Scripting | 1 | 10-21-2004 08:05 AM |
| How can I map Unix keyboard for PC keyboard | simhab | UNIX for Advanced & Expert Users | 1 | 03-06-2002 07:29 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Keyboard Input
Does anyone know how do you determine the user idle time of STDIN in order to log the user out for being idle too long. I would like to write a c program to do this but I it is not clear upon how to determine idle time from keyboard input. I have found that the "who.c" source file uses the last access time of the tty. Is there no other way than access and mod times to see if the user is writing to STDIN and at what time?
Thanks in advance. Chris |
| Forum Sponsor | ||
|
|
|
|||
|
|
|
|||
|
I thought this would be the more appropriate forum since it is the programming forum. I did not know of its existence until now. There may be C programmers that do look at the scripting forum. You should have bitched at me earlier for posting in the wrong forum the first time. Someone must know the answer to this problem! Please Help!
|
|
|||
|
The other forum was not precisely wrong, but double posting is against the rules. I'm not a moderator or anything, so don't pay any attention to me. Your question here is somewhat different than the first one anyway so maybe it's okay.
However, it's somewhat intriguing to think that there must be a better way, but the author of who.c choses not to use it. Could you elaborate on that train of thought, and maybe explain why you want to avoid using the tty access time? |
|
|||
|
Last edited by Franklin52; 04-07-2008 at 10:59 AM. |
|||
| Google UNIX.COM |
| Thread Tools | |
| Display Modes | |
|
|