From 40e84ff86be14604b320058b067607044b4b8f47 Mon Sep 17 00:00:00 2001
From: Steven Baltakatei Sandoval <baltakatei@gmail.com>
Date: Thu, 9 Jul 2020 19:58:45 +0000
Subject: [PATCH] feat(unitproc/bkFreqWrite):Add read timeout

Signed-off-by: Steven Baltakatei Sandoval <baltakatei@gmail.com>
---
 unitproc/bkFreqWrite | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/unitproc/bkFreqWrite b/unitproc/bkFreqWrite
index f1c13aa..e608ba4 100644
--- a/unitproc/bkFreqWrite
+++ b/unitproc/bkFreqWrite
@@ -18,7 +18,7 @@ while [[ $SECONDS -lt "scriptTTL" ]]; do
     bufferTOD="$((SECONDS + $bufferTTL))";
     lineCount=0;
     # Consume stdin to fill buffer until buffer time-of-death (TOD) arrives
-    while read -r line && [[ $SECONDS -lt "$bufferTOD" ]]; do
+    while read -r -t "$bufferTTL" line && [[ $SECONDS -lt "$bufferTOD" ]]; do
 	# Append line to buffer array
 	buffer+=("$line");
 	echo "DEBUG:Processing line:$lineCount";
-- 
2.39.5