Work around a dash bug prematurely killing the event loop.

This commit is contained in:
Kris Maglione 2010-05-28 20:30:20 -04:00
parent 185fdef6f3
commit fd8ecb1245

View File

@ -196,8 +196,13 @@ wi_eventloop() {
if [ "$1" = -i ]
then cat
else wmiir read /event
fi | while read wi_event
do
fi | awk '/./ { print; fflush() } END { print "" }' |
while :; do
# Work around a dash bug.
# Only quit on successful read of a blank line.
read wi_event || continue
test -n "$wi_event" || break
IFS="$wi_newline"
wi_arg=$(echo "$wi_event" | sed 's/^[^ ]* //')
unset IFS