:
#	@(#) oakill 23.2 91/08/29 
#
#	Copyright (C) 1987-1991 The Santa Cruz Operation, Inc.
#		All Rights Reserved.
#	The information in this file is provided for the exclusive use of
#	the licensees of The Santa Cruz Operation, Inc.  Such users have the
#	right to use, modify, and incorporate this code into other products
#	for purposes authorized by the license agreement provided they include
#	this notice and the associated copyright notice with any such product.
#	The information in this file is provided "AS IS" without warranty.
#

OALIB=${OALIB-"/usr/lib/oa"}
PATH=$OALIB/utilbin:$PATH

 # run ourself thru oash 
eval oainit 2>/dev/null || (oash $0; kill $$)
. `findfile shell_strs`

EscWasHit() { 
	oadeinit
	rm -f $TEMP
	exit
}

TEMP=/tmp/fm1$$
set `who am i` xx
ps -fu $1 > $TEMP

 #OAKILL1="Select program to kill"
wmopen 1 13 74 3 2 
wmtitle "$OAKILL1" 
wmmessage -r "$PRESSRET" 
pp -f $TEMP
rm -f $TEMP
[ "$PP_NUM" -eq -1 ] && EscWasHit
set $PP_ITEM; Pid=$2

 #OAKILL2="Type of Signal"
 #OAKILL3="2 - Interrupt"
 #OAKILL4="4 - Terminate"
 #OAKILL5="9 - Unconditional"
 # The length of the box (num of columns) used to display the strings
 # OAKILL3, OAKILL4, OAKILL5.
 # The title of the box is OAKILL2.
 #KILL_NUMCOLS=30
wmopen 2 5 $KILL_NUMCOLS 15 10
wmtitle "$OAKILL2"
wmmessage -r "$PRESSRET" 
pp "$OAKILL3" "$OAKILL4" "$OAKILL5" 
[ "$PP_NUM" -eq -1 ] && EscWasHit

set $PP_ITEM; SigNum=$1
eval kill -$SigNum $Pid 2>$TEMP || { 
	wmove 1
	wmmessage -r "$USEARROW"
	scan -e"$EOFMSG" $TEMP 
}
rm -f $TEMP
oadeinit
