server: fix server not exit issue on asus router

This commit is contained in:
Nick Peng
2022-07-02 13:26:58 +08:00
parent 362b7f978f
commit 301ab3ba10
2 changed files with 12 additions and 1 deletions

View File

@@ -348,7 +348,13 @@ case "$1" in
fi
if [ ! -d "/proc/$pid" ]; then
return 0;
return 0
fi
stat="$(cat /proc/${pid}/stat | awk '{print $3}' 2>/dev/null)"
if [ "$stat" = "Z" ]; then
$SLEEP $SLEEPTIME
return 0
fi
$SLEEP $SLEEPTIME 2>/dev/null