Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!emba-news.uvm.edu!aix1.emba.uvm.edu!wollman From: wollman@aix1.emba.uvm.edu (Garrett Wollman) Subject: Time tracking Message-ID: <1993Nov12.205635.11654@emba.uvm.edu> Sender: news@emba.uvm.edu Supersedes: <1993Nov12.204709.11320@emba.uvm.edu> Organization: University of Vermont, EMBA Computer Facility References: <2aukp0$241@galaxy.ucr.edu> <2bsgnk$gm3@u.cc.utah.edu> Date: Fri, 12 Nov 1993 20:56:35 GMT Lines: 30 [If you see three copies of this, your news software is probably broken.] In article <2bsgnk$gm3@u.cc.utah.edu>, A Wizard of Earth C <terry@cs.weber.edu> wrote: >Or you could write a program called "logout" and have it kill -1 the >parent process of the parent process ... back to the shell whose first >argument is "-" (thus killing the login session). There are many ways to >log yourself out. Then it could read your wtmp entry directly and get >better resoloution. This won't work. When the login shell dies, POSIX specifies that its controlling terminal(*) is to be automatically revoke()d. (In our system, that translates into a vgone(p->p_session->sess_ttyvp).) As a result, the `logout' process would be unable to write anything to the tty, since it no longer has a valid reference thereto (vp->vp_vnops replaced with the dead_vnops). -GAWollman (*)Actually, this only happens if the login shell is a session leader, and happens when any session leader exits. All login shells should be session leaders, with the exception of `su -' and a few other similar cases. -- Garrett A. Wollman | Shashish is simple, it's discreet, it's brief. ... wollman@emba.uvm.edu | Shashish is the bonding of hearts in spite of distance. uvm-gen!wollman | It is a bond more powerful than absence. We like people UVM disagrees. | who like Shashish. - Claude McKenzie + Florent Vollant