From d8f1541afab1af031870d68722c4f38604beb330 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Sun, 12 Jul 2020 14:33:08 +0200 Subject: [PATCH] Fixed kill/terminate/interrupt not working in OsX and FreeBSD --- bashtop | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bashtop b/bashtop index 1e26788..406e05f 100755 --- a/bashtop +++ b/bashtop @@ -4232,7 +4232,8 @@ killer_() { #? Kill process with selected signal local kill_op="$1" kill_pid="$2" killer_out killer_box col line program keypress selected selected_int=0 sig confirmed=0 option killer_pause status msg local -a options=("yes" "no") - if ! program="$(ps -o comm --no-header -p ${kill_pid})"; then return; fi + if ! program="$(ps -o comm -p ${kill_pid})"; then return + else program="$(tail -n1 <<<"$program")"; fi case $kill_op in t|T) kill_op="terminate"; sig="SIGTERM" ;;