feat(unitproc/bkFreqWrite):Add read timeout
authorSteven Baltakatei Sandoval <baltakatei@gmail.com>
Thu, 9 Jul 2020 19:58:45 +0000 (19:58 +0000)
committerSteven Baltakatei Sandoval <baltakatei@gmail.com>
Thu, 9 Jul 2020 19:58:45 +0000 (19:58 +0000)
Signed-off-by: Steven Baltakatei Sandoval <baltakatei@gmail.com>
unitproc/bkFreqWrite

index f1c13aaece05588d6cbf5f636888c0a6d0aecc40..e608ba44b3d5a01e94d68eb0acff43942ef145ec 100644 (file)
@@ -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";