Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnews!cbnewsm!abm From: abm@cbnewsm.att.com (andrew.b.myers) Newsgroups: comp.unix.admin Subject: Re: Abandoned shell Summary: Fix found to abandoned shell Keywords: exec Message-ID: <1990Dec11.014821.28748@cbnewsm.att.com> Date: 11 Dec 90 01:48:21 GMT References: <1990Dec9.020043.273@cbnewsm.att.com> Distribution: na Organization: AT&T Bell Laboratories Lines: 42 In article <1990Dec9.020043.273@cbnewsm.att.com>, abm@cbnewsm.att.com (andrew.b.myers) writes: > > What's the best sure-fire way to kill a login shell instantaneously > if a user disconnects "ungracefully"? I'm sure anyone who knows > anything about system administration can help me. I just don't > happen to know anything about system administration. > > [description of the problem deleted...] > -- > ======================================================================== > Andrew Myers AT&T, Basking Ridge, NJ ...attmail!abmyers > Public Relations 201-221-2737 ...att!brpr04!abm > ======================================================================== I am following up to my original ariticle to let you all know a fix has been found. The operative advice came from Tom Gillespie (tag@mtunf.att.com) who suggested I try setting a trap to cause the shell to commit suicide upon hangup. Simple fix, and it works fine. For those who asked me to let them know if I found a fix, just put this in the user's .profile or (as I did) within the shell script itself: trap "kill -9 0" 1 This issues a large sledged hammer kill on the parent and all child processes upon detection of SIGHUP (Signal 1). I erred in saying earlier that Mr. "go" was still logged in. What I saw was an active abandoned rsh when I checked with ps -ef. A who -a indicated the user was not logged in. Thus the problem wasn't with the modem at all. In fact, I was able to duplicate the abandoned shell behavior using another hardwired port. The modem works fine. For those who asked, the switch 6 was set UP and properly dropped DSR upon hangup. Thanks very much to all those who responded! This damned net is fantastic. --andy myers-- -- ======================================================================== Andrew Myers AT&T, Basking Ridge, NJ ...attmail!abmyers Public Relations 201-221-2737 ...att!brpr04!abm ========================================================================