Explorar o código

Cleaning up where the pid vanishes between the query and the evaluation.

CedarLUG %!s(int64=9) %!d(string=hai) anos
pai
achega
b8c82acbe8
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      lgsm/functions/command_stop.sh

+ 1 - 0
lgsm/functions/command_stop.sh

@@ -209,6 +209,7 @@ fn_stop_ark(){
 								rev | cut -d\/ -f1)
 						#
 						# check for a valid pid
+						pid=${pid//[!0-9]/}
 						let pid+=0 # turns an empty string into a valid number, '0',
 						# and a valid numeric pid remains unchanged.
 						if [[ ${pid} -gt 1 && $pid -le $(cat /proc/sys/kernel/pid_max) ]] ; then