Path: utzoo!utgpu!water!watmath!clyde!rutgers!princeton!mccc!pjh From: pjh@mccc.UUCP (Peter J. Holsberg) Newsgroups: comp.unix.questions Subject: Logging the ^d logoff Message-ID: <209@mccc.UUCP> Date: 11 Feb 88 22:06:04 GMT Organization: The College on the Other Side of US Route 1 Lines: 21 A while ago, I expressed interest in a method of creating a file of user logins/outs. Many people made many helpful suggestions, but I find myself without a solution. One suggestion, which came very close, was to trap 0 1 3 with a line in /etc/profile so that on ^d logout (or hangup, etc.) a line with "who am i" information would be written to /usr/.logins. I found that this worked quite well except for one thing: despite the fact that the login time is accurate, the logout time is always about one second after the login time, regardless of the actual logout! So, how can I make "who am i", imbedded in a 'trap' statement execute at the instant of the trap, rather than when /etc/profile is first executed? Many thanks for your help. -- Peter Holsberg UUCP: {rutgers!}princeton!mccc!pjh Technology Division CompuServe: 70240,334 Mercer College GEnie: PJHOLSBERG Trenton, NJ 08690 Voice: 1-609-586-4800