public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Phillip Susi <psusi@cfl.rr.com>
To: Greg KH <gregkh@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: tty idle time and hooking inode_ops from a chardev
Date: Fri, 16 Dec 2011 14:49:31 -0500	[thread overview]
Message-ID: <4EEBA0CB.1050006@cfl.rr.com> (raw)
In-Reply-To: <20111216183613.GA3612@suse.de>

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.

      parent reply	other threads:[~2011-12-16 19:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-16 16:52 tty idle time and hooking inode_ops from a chardev Phillip Susi
2011-12-16 17:57 ` Greg KH
2011-12-16 18:22   ` Phillip Susi
2011-12-16 18:36     ` Greg KH
2011-12-16 19:09       ` Phillip Susi
2011-12-16 19:49       ` Phillip Susi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EEBA0CB.1050006@cfl.rr.com \
    --to=psusi@cfl.rr.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox