mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2026-11-11 00:40:07 +01:00
fix: Clear invalid PID values in shared reader (#1336)
This commit is contained in:
1 parent
a713b728ff
commit
f6871dd61b
1 file changed
+6
-1
+6
-1
@@ -18,7 +18,12 @@ readPidFile() {
|
||||
|
||||
_pid=$(<"$file")
|
||||
|
||||
[[ "$_pid" =~ ^[1-9][0-9]*$ ]]
|
||||
if [[ ! "$_pid" =~ ^[1-9][0-9]*$ ]]; then
|
||||
_pid=""
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
hasFlag() {
|
||||
|
||||
Reference in new issue
Block a user