From owner-freebsd-hackers Wed Jul 25 0:45:12 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from scaup.mail.pas.earthlink.net (scaup.mail.pas.earthlink.net [207.217.121.49]) by hub.freebsd.org (Postfix) with ESMTP id 7FB8437B403 for ; Wed, 25 Jul 2001 00:45:07 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from mindspring.com (dialup-209.245.141.74.Dial1.SanJose1.Level3.net [209.245.141.74]) by scaup.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id AAA16533; Wed, 25 Jul 2001 00:45:04 -0700 (PDT) Message-ID: <3B5E791A.156715E2@mindspring.com> Date: Wed, 25 Jul 2001 00:45:30 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: "David E. Cross" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: exec() doesn't update access time References: <200107250035.UAA72348@cs.rpi.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "David E. Cross" wrote: > I noticed that exec(2) does not update the last access time of a file... > is this intentional? POSIX only mandates updates of time fields in very specific cirumstances: when using particular API's. So if you use a different or unexpected API, an update is not required. For example, I had an FS that allowed you to read both directory entry and stat information simultaneously from a directoy, and did globbing in the kernel. Since it was neither "getdireentries" nor "read", I didn't have to do the update that would otherwise have been required. In the exec case, we are talking something very like mmap, where the kernel never gets notification if the read, in any case: it is only when you use an accessor or mutator function, like read or write, where the operation can be hooked, because it is procedural, that an update can even be forced to occur, under any circumstances. Data interfaces are effectively immune from such monitoring. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message