From 25cc0971eb8aedeceec3a15f2874e57613d50839 Mon Sep 17 00:00:00 2001 From: naddy Date: Wed, 24 May 2023 20:04:05 +0000 Subject: [PATCH] replace "$(cat file)" with the ksh construct "$( @@ -77,7 +77,7 @@ wait_cgiinfo() { local _l _s _key _val if [ -f /tmp/cgipid ]; then - wait "$(cat /tmp/cgipid)" 2>/dev/null + wait "$(/dev/null rm -f /tmp/cgipid fi @@ -2650,7 +2650,7 @@ start_cgiinfo() { ( sleep 12; if [ -f /tmp/cgipid ]; then - kill -INT -"$(cat /tmp/cgipid)" >/dev/null 2>&1 + kill -INT -"$(/dev/null 2>&1 # wait will be done by wait_cgiinfo fi ) & @@ -3449,7 +3449,7 @@ do_upgrade() { # Perform final steps common to both an install and an upgrade. finish_up if [ -f /tmp/wdpid ]; then - kill -KILL "$(cat /tmp/wdpid)" 2>/dev/null + kill -KILL "$(/dev/null # do not bother waiting rm -f /tmp/wdpid fi @@ -3480,7 +3480,7 @@ WATCHDOG_PERIOD_SEC=$((30 * 60)) reset_watchdog() { local _pid if [ -f /tmp/wdpid ]; then - _pid=$(cat /tmp/wdpid) + _pid=$(/dev/null wait $_pid 2>/dev/null rm -f /tmp/wdpid -- 2.20.1