Home Man
Search
Today's Posts
Register

Post questions about C, C++, Java, SQL, and other programming languages here.

Keyboard Input

Tags
input, keyboard, keyboard input, programming

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 04-07-2008
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
# 2  
Old 04-07-2008
Please don't double post. See the forum rules.

https://www.unix.com/shell-programmin...idle-time.html
# 3  
Old 04-07-2008
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!
# 4  
Old 04-07-2008
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?
# 5  
Old 04-07-2008
Double post, continu here:

https://www.unix.com/shell-programmin...idle-time.html

Thread closed.

Last edited by Franklin52; 04-07-2008 at 01:59 PM..
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Run command if no mouse or keyboard input drew77 Shell Programming and Scripting 0 4 Weeks Ago 12:17 PM
Keyboard User Input in awk language ? Zabo Programming 6 05-17-2017 04:25 PM
Read input from Keyboard, do not proceed if no input aravindadla Shell Programming and Scripting 7 02-26-2016 01:24 PM
How to get input from keyboard with watch? bacarrdy Shell Programming and Scripting 0 04-01-2015 08:11 PM
sed execution with input from keyboard loggedin.ksh Shell Programming and Scripting 1 10-09-2012 09:18 AM
Keyboard input question biopulse Shell Programming and Scripting 5 11-29-2010 12:41 AM
How to get capture input events from keyboard and mouse yhacks Programming 4 05-26-2008 07:31 AM
Detecting Keyboard Input without return ravneetd Programming 4 05-10-2007 07:58 AM
Don't show keyboard input on terminal marianor31 Shell Programming and Scripting 1 03-23-2007 06:54 PM
suppressing keyboard input anthreedhr Shell Programming and Scripting 1 10-21-2004 11:05 AM


All times are GMT -4. The time now is 04:32 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password