#!/bin/csh
#
# This script will kill all the processes that might be
# associated with the DD system after a hang
# It is quick and dirty.... 
#
# CW Jan 22, 1996
#

#
# removing the processes - some users might want to change these lines
# ----------------------------------------------------------------------
#
echo "removing all processes ..."
set me = `whoami`
@ n = 0
ps -u $me  -o pid,comm | grep -i dd

foreach i (`ps -u $me -o pid,comm | grep -i coda_ | sed '/coda_clean/d'`)
        @ n += 1
        @ k = $n % 2
        if ( $k == 1 ) then
                echo " killing process $i"
                kill -9 $i
        endif
end

