search pid whether exists or not

This commit is contained in:
Ricardo_Cui
2021-02-18 17:48:59 +08:00
committed by Gitee
parent 72f8074bcd
commit 62eb169b09

View File

@ -134,7 +134,7 @@ class Kernel(BaseComponent):
curuid=`id -u`| xargs ls -l | awk '{if ($NF==\"%s\") print $(NF-2)}' \
| awk -F/ '{print $3 }'" % (self.instInfo.datadir)
(status, rightpid) = subprocess.getstatusoutput(cmd)
if rightpid:
if rightpid or status != 0:
GaussLog.exitWithError(output)
def isPidFileExist(self):