From: obrien@bud.peinet.pe.ca (Kevin O'Brien)
Subject: Re: Killing processes on hangup
Date: 22 Mar 1994 08:29:21 -0400 [thread overview]
Message-ID: <2mmob1$9ff@bud.peinet.pe.ca> (raw)
In-Reply-To: 2mlaac$60j@coranto.ucs.mun.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. |
+---------------------------------------------------------------------------+
next prev parent reply other threads:[~1994-03-22 12:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-03-17 13:02 Killing processes on hangup Martin J. Laubach
1994-03-20 4:13 ` Hans-Peter Stoerr
1994-03-21 23:23 ` Tony Galway
1994-03-22 12:29 ` Kevin O'Brien [this message]
1994-03-23 0:13 ` Tony Galway
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox