lkml.org 
[lkml]   [2011]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: tty idle time and hooking inode_ops from a chardev
On 12/16/2011 1:36 PM, Greg KH wrote:
> As you are opening the tty node once, that's when atime is set, right?
> The fact that you keep it open still keeps the atime to the original
> open time, you aren't supposed to check for every single read/write of
> the node once it was opened.
>
> But to be sure, what does POSIX say about this?

Actually it looks like POSIX 4.8 "File Times Update" requires the
timestamps to be updated on every read/write, which is probably why
Linux does that.

So the problem is just the /dev/tty alias having a different inode than
the actual controlling tty. It also makes the output of lsof less
useful, so maybe the real fix is to somehow make opening /dev/tty
actually open the correct tty inode and dentry.

I have a feeling that will require changing /dev/tty from being a
devnode to a symlink to something in /dev/pts.


\
 
 \ /
  Last update: 2011-12-16 20:53    [W:0.041 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site