From: tony@engr.mun.ca (Tony Galway)
Subject: Re: Killing processes on hangup
Date: 21 Mar 1994 23:23:56 GMT [thread overview]
Message-ID: <2mlaac$60j@coranto.ucs.mun.ca> (raw)
In-Reply-To: 2mgiho$j7a@irz401.inf.tu-dresden.de
hs3@irz.inf.tu-dresden.de (Hans-Peter Stoerr) writes:
>> Is there a way to automatically kill all processes left behind
>> on logout?
>If Your users use csh or tcsh, you may put something like
>kill `ps -x | tail +2 | gawk '{print $1}'`
>in their standard .logout
This unfortunately is not really a very good solution. We have the same
problem here, and looks like we are going to have to write a
program/script, something to take care of this.
tin, nn, vi ... programs such as these should always have a terminal
associated with it, however there are also programs that should be
run in the background. We have users placing massive abaqus, ansys,
matlab, and private programs in the background that should not be
killed.
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 :) )
would search for all "nn" sessions and kill off those that have ?? in the
TT field.
This is a little unwieldy, but its probably easiest, if anyone has
a better sugestion, I am all ears.
-Tony
--
Tony Galway Life is what happens while you're
C-CAE |\_/| making other plans.
Memorial University (` ')
tony@engr.mun.ca | |
next prev parent reply other threads:[~1994-03-21 23:23 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 [this message]
1994-03-22 12:29 ` Kevin O'Brien
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