From 4ac60452f58dbbd4b1486c22fd5dcae74de91e96 Mon Sep 17 00:00:00 2001 From: Aaron McPhall Date: Sat, 27 Jul 2013 23:23:44 -0600 Subject: [PATCH] p2console busy loops when it cannot read from stdin --- packages/p2/service/p2console/p2console | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/p2/service/p2console/p2console b/packages/p2/service/p2console/p2console index 310396a..7f3f3d6 100755 --- a/packages/p2/service/p2console/p2console +++ b/packages/p2/service/p2console/p2console @@ -1,5 +1,9 @@ #! /bin/sh while true; do + TIME=$(date +%s) /opt/p2/bin/p2console + if [ $TIME = $(date +%s) ]; then + exit + fi done | /opt/p2/bin/modem