From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,f38af7259640f04 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-03-22 04:29:21 PST Path: gmd.de!newsserver.jvnc.net!netnews.upenn.edu!news.amherst.edu!news.mtholyoke.edu!news.byu.edu!news.kei.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!torn!news.unb.ca!upei.ca!peinet.pe.ca!peinet.pe.ca!not-for-mail From: obrien@bud.peinet.pe.ca (Kevin O'Brien) Newsgroups: comp.unix.osf.osf1 Subject: Re: Killing processes on hangup Date: 22 Mar 1994 08:29:21 -0400 Organization: PEINet, Charlottetown, Prince Edward Island, Canada Message-ID: <2mmob1$9ff@bud.peinet.pe.ca> References: <2m9kdv$ald@email.tuwien.ac.at> <2mgiho$j7a@irz401.inf.tu-dresden.de> <2mlaac$60j@coranto.ucs.mun.ca> NNTP-Posting-Host: bud.peinet.pe.ca In article <2mlaac$60j@coranto.ucs.mun.ca> tony@engr.mun.ca writes: [clipoid] >You might consider creating a program/script that has a file that contains >those programs that should NOT be separated from their ttys, and grep >for those searching to see if ?? appears in the TT field, so for example, > >ps aux | grep nn | awk '{if ($7 == "??") {print $2}}' | xargs kill -HUP >( or TERM or KILL <-- my favorite .. works all the time :) ) Mine looks like the following. Not as elegant as yours but it works (sort of). ps -ef |grep "??" |grep -v root |grep -v news |cut -c10-15 > $HOME/.kill_PIDs Then I just step through the file .kill_PIDs and "kill -9" everything I find. The "grep -v"'s just keep the essentials from getting boinged! The question still remains: Why in #%$@#%@ do we have to do this stuff anyway? Where is the parameter that we set that will cause OSF to deal with orphans the way (most?) other UNIX's do? I'm far too busy to hack. An if I wasn't too busy, I'd be running Linux, cheap and hacker heaven! -- +---------------------------------------------------------------------------+ | Kevin O'Brien | Network Analyst PEINet | obrien@peinet.pe.ca | This space | | P.O. Box 3126 | Charlottetown P. E. I. | Canada, C1A- 7N9 | for rent. | +---------------------------------------------------------------------------+