GNU bug report logs - #10306
who and idle time

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Reported by: Phillip Susi <psusi@HIDDEN>; dated Fri, 16 Dec 2011 03:01:02 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Dec 2011 03:00:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 15 22:00:10 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RbO1q-0002OH-EJ
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 22:00:10 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <psusi@HIDDEN>) id 1RbO1n-0002O9-RT
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 22:00:08 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <psusi@HIDDEN>) id 1RbO0H-0000Ag-C5
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 21:58:34 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([140.186.70.17]:47331)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <psusi@HIDDEN>) id 1RbO0H-0000AX-AZ
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 21:58:33 -0500
Received: from eggs.gnu.org ([140.186.70.92]:39168)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <psusi@HIDDEN>) id 1RbO0G-0000MG-67
	for bug-coreutils@HIDDEN; Thu, 15 Dec 2011 21:58:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <psusi@HIDDEN>) id 1RbO0D-00005U-KL
	for bug-coreutils@HIDDEN; Thu, 15 Dec 2011 21:58:32 -0500
Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:11816)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <psusi@HIDDEN>) id 1RbO0D-0008Ts-I2
	for bug-coreutils@HIDDEN; Thu, 15 Dec 2011 21:58:29 -0500
X-Authority-Analysis: v=2.0 cv=QJ/qt33L c=1 sm=0 a=QETZmXXmyubuBiJjAgCHWw==:17
	a=acFpV6Ajmw0A:10 a=8nJEP1OIZ-IA:10 a=xe8BsctaAAAA:8
	a=xEZF5J0RHv-y2P6np-IA:9 a=wPNLvfGTeEIA:10
	a=QETZmXXmyubuBiJjAgCHWw==:117
X-Cloudmark-Score: 0
X-Originating-IP: 97.103.252.48
Received: from [97.103.252.48] ([97.103.252.48:35820] helo=[192.168.1.3])
	by cdptpa-oedge03.mail.rr.com (envelope-from <psusi@HIDDEN>)
	(ecelerity 2.2.3.46 r()) with ESMTP
	id 0C/0D-22259-1D3BAEE4; Fri, 16 Dec 2011 02:58:26 +0000
Message-ID: <4EEAB3D1.60608@HIDDEN>
Date: Thu, 15 Dec 2011 21:58:25 -0500
From: Phillip Susi <psusi@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: bug-coreutils@HIDDEN
Subject: who and idle time
X-Enigmail-Version: 1.4a1pre
X-Enigmail-Draft-Status: 513
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -6.0 (------)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.0 (------)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've long wondered why the idle time reported by who is sometimes wrong, mostly with X terminals, and also I recently noticed, when running emacs or less.  I was shocked to see that the time is found by checking the atime of the tty device.  The reason it is sometimes not updated is because emacs and less open /dev/tty, which is effectively whichever controlling tty they are attached to, except that it is a different inode, and so the read()s update the atime of /dev/tty instead of /dev/ttyXX.  At first I thought that I could fix this, but now it occurs to me that the whole concept is fundamentally flawed because you can have multiple inodes that all point to the same chardev, so which one should get updated?

Shouldn't the kernel tty driver keep track of idle time and let you read it with an ioctl?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJO6rPGAAoJEJrBOlT6nu75PhEH/31JO8TYXhuqYon1lXj1B9qf
brCSzahX+gIU9uZoN4YQzKywnSOH4niVntnGfElifdORPJOdpfUbrjrQ6uRfpg5r
t5gA1BfA9y6Dz6WxI/BHPyyLzpkWIHAFjEkNM8D6QoSNpSZWX4lqpr1mO4V18vPs
pKU6bx7GxUAo+VWehmgMwrVkYAozBY/AS+gnoHoOs8mIHxl/OQ5n63Zpf0CJM1Gb
nxON6AJnmh//pq1G1qTV9sLQjAripeS4l4T08+DcKQ0+oCf+iBx7aNrMvHdKLzqP
VsVO/WWmhu3PEOcjYAy+1/smkuAM+xP6X8iPR1Hd+PLXmGyprZNm+LlzkHDRzd4=
=e8D9
-----END PGP SIGNATURE-----




Acknowledgement sent to Phillip Susi <psusi@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#10306; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.