[Rock-dev] Tool: "orokill"?
Matthias Goldhoorn
matthias.goldhoorn at dfki.de
Thu Jan 9 13:42:57 CET 2014
I have a simliar one locally (adapted from killtree found by google) you
have to pass the killtype
#!/bin/bash
killtree() {
local _pid=$1
local _sig=${2:-TERM}
kill -stop ${_pid} # needed to stop quickly forking parent from
producing child between child killing and parent killing
for _child in $(ps -o pid --no-headers --ppid ${_pid}); do
killtree ${_child} ${_sig}
done
echo "killing -${_sig} ${_pid}"
kill -${_sig} ${_pid}
}
PSID=`ps | grep ruby | sed -e "s/\([0-9]\) .*/\1/g" | head -n1`
echo Killng $PSID
killtree $PSID $@
On 09.01.2014 13:40, Martin Zenzes wrote:
> (killed) correctly on ruby-script-end. This results in running manually
--
Dipl.-Inf. Matthias Goldhoorn
Space and Underwater Robotic
Universität Bremen
FB 3 - Mathematik und Informatik
AG Robotik
Robert-Hooke-Straße 1
28359 Bremen, Germany
Zentrale: +49 421 178 45-6611
Besuchsadresse der Nebengeschäftstelle:
Robert-Hooke-Straße 5
28359 Bremen, Germany
Tel.: +49 421 178 45-4193
Empfang: +49 421 178 45-6600
Fax: +49 421 178 45-4150
E-Mail: matthias.goldhoorn at informatik.uni-bremen.de
Weitere Informationen: http://www.informatik.uni-bremen.de/robotik
More information about the Rock-dev
mailing list