The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM



Thread: Keyboard Input
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 04-07-2008
cpaquette cpaquette is offline
Registered User
 

Join Date: Apr 2008
Posts: 5
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