mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2026-08-28 20:06:05 +00:00
fix: Clear invalid PID values in shared reader (#1336)
This commit is contained in:
+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