Messages in this thread | | | Date | Fri, 16 Dec 2011 14:49:31 -0500 | From | Phillip Susi <> | Subject | Re: 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.
| |