Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site elsie.UUCP
Path: utzoo!linus!decvax!genrad!panda!talcott!harvard!seismo!elsie!ado
From: a...@elsie.UUCP (Arthur David Olson)
Newsgroups: net.unix
Subject: access(2) vs. st_atime
Message-ID: <6002@elsie.UUCP>
Date: Thu, 2-Jan-86 19:05:34 EST
Article-I.D.: elsie.6002
Posted: Thu Jan  2 19:05:34 1986
Date-Received: Fri, 3-Jan-86 05:32:36 EST
Organization: NIH-LEC, Bethesda, MD
Lines: 26
Keywords: access

Housekeeping at the New Year brought this to my attention--the result of a
    ls -lu /usr/spool/uucppublic/.hushlogin
command on our 4.1bsd VAX 11/750:
    -rw-r--r-- 1 uucp          0 Mar  6  1984 /usr/spool/uucppublic/.hushlogin

"What?" I asked myself, knowing that "/bin/login" must deal with the above file
several hundred times a day.  As indeed it does, thusly (as usual, the trade
secret status of the code involved precludes a clearer posting):
	...
	char	qlog[]  =	".hushlogin";
	...
	quietlog = FALSE;
	if (access(qlog, 0) == 0)
		quietlog = TRUE;
	...

Now granted, doing an "stat" call on a file ought not change the access time
of the file (so that doing a "ls" of a directory doesn't make it look as if
you've peeked at every file in the directory).  However...shouldn't an "access"
call on a file change the "last access" time for the file?  Does it do so on
systems other than 4.1bsd?
--
UNIX is an AT&T Bell Laboratories trademark.
--
	UUCP: ..decvax!seismo!elsie!ado    ARPA: elsie!...@seismo.ARPA
	DEC, VAX and Elsie are Digital Equipment and Borden trademarks