Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!samsung!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.wizards Subject: Re: When does access date get set on tty device Keywords: access date tty device Message-ID: <1990Aug28.131209.17038@virtech.uucp> Date: 28 Aug 90 13:12:09 GMT References: <1067@prcrs.UUCP> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Organization: Virtual Technologies Inc., Sterling VA Lines: 29 In article <1067@prcrs.UUCP> mcvic@prcrs.UUCP (David McVicar) writes: >Question: > >At what point does the st_atime field in the inode get updated when writing >to a tty device? The st_atime will be updated by a call to any of the following system calls: creat, mknod, pipe, utime, and read. st_mtime will be updated by a call to any of the following system calls: creat, mknod, pipe, utime, and write. (Actually the *time is updated following completion of the operation, just prior to the system call returning) >Problem: We have 300 baud devices that take too long to print reports and > our auto-logout daemon detects an old access time and > no cpu usage for that tty and terminates the user's processes. You probably want to use the latter of st_atime and st_mtime for your idle time calculations. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170