diff --git a/testsuite/expect/pkill b/testsuite/expect/pkill index 17fb391fb99b13afc47db769e301ceefd0e6a254..143a73c5114832a3d176f18201aee3db66ed15dc 100755 --- a/testsuite/expect/pkill +++ b/testsuite/expect/pkill @@ -66,19 +66,19 @@ if [ $user_id -eq -1 ]; then fi # Find the appropriate processes and signal them if [ $signal == "INT" ]; then - ps -o "%p %c" -U $user_id | grep " $command$" | awk '{printf "kill -s INT %s\n",$1}' | bash + ps -o "%p %c" -U $user_id | grep " $command" | awk '{printf "kill -s INT %s\n",$1}' | bash exit 0 fi if [ $signal == "KILL" ]; then - ps -o "%p %c" -U $user_id | grep " $command$" | awk '{printf "kill -s KILL %s\n",$1}' | bash + ps -o "%p %c" -U $user_id | grep " $command" | awk '{printf "kill -s KILL %s\n",$1}' | bash exit 0 fi if [ $signal == "USR1" ]; then - ps -o "%p %c" -U $user_id | grep " $command$" | awk '{printf "kill -s USR1 %s\n",$1}' | bash + ps -o "%p %c" -U $user_id | grep " $command" | awk '{printf "kill -s USR1 %s\n",$1}' | bash exit 0 fi if [ $signal == "USR2" ]; then - ps -o "%p %c" -U $user_id | grep " $command$" | awk '{printf "kill -s USR2 %s\n",$1}' | bash + ps -o "%p %c" -U $user_id | grep " $command" | awk '{printf "kill -s USR2 %s\n",$1}' | bash exit 0 fi echo "Unsupported signal $signal"