From 86fa747c5d2b373d89c6a765f5d1328d2de9c454 Mon Sep 17 00:00:00 2001
From: kpetersn <kmpeters@anl.gov>
Date: Thu, 7 Mar 2019 14:34:26 -0600
Subject: [PATCH] Compare pids as integers to avoid problems caused by leading
 whitespace

---
 iocBoot/iocxxx/softioc/xxx.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/iocBoot/iocxxx/softioc/xxx.sh b/iocBoot/iocxxx/softioc/xxx.sh
index 18b9a95..2ffa63f 100755
--- a/iocBoot/iocxxx/softioc/xxx.sh
+++ b/iocBoot/iocxxx/softioc/xxx.sh
@@ -107,12 +107,12 @@ checkpid() {
                         for s_pid in ${S_PIDS} ; do
                             #!${ECHO} ${s_pid}
 
-                            if [ "${s_pid}" = "${P_PID}" ] ; then
+                            if [[ ${s_pid} -eq ${P_PID} ]] ; then
                                 SCREEN_PID=${s_pid}
                                 break
                             fi
                     
-                            if [ "${s_pid}" = "${GP_PID}" ] ; then
+                            if [[ ${s_pid} -eq ${GP_PID} ]] ; then
                                 SCREEN_PID=${s_pid}
                                 break
                             fi
-- 
GitLab