sysmgr

a simplistic service supervisor
git clone git://git.ckyln.com/~cem/sysmgr.git
Log | Files | Refs | README | LICENSE

commit e870fb509c475659d4dd8c42f02958f4d400e85d
parent ccda34b0cc6edc84653f3ae602e6f4befe7f21b5
Author: Cem Keylan <cem@ckyln.com>
Date:   Fri, 31 Jul 2020 19:26:36 +0300

term(): use read instead of cat

Diffstat:
Msysmgr | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sysmgr b/sysmgr @@ -79,8 +79,9 @@ term() { # hangup signal. It enters the termination state where it forwards SIGTERM # to every other runsyssv process that have their process ids in the RUNDIR. - for process in "${RUNDIR:?}"/*/syspid ; do - kill -15 "$(cat "$process")" 2>/dev/null + for process in "$RUNDIR"/*/syspid ; do + read -r pid < "$process" + kill -15 "$pid" 2>/dev/null done # Wait for the redirections to happen