On Tue, Jun 08, 2010 at 07:49:50PM +0200, David Engster wrote:
Kris Maglione writes:
I'm releasing wmii 3.9.1, mainly to deal with bugs which have cropped
up in the latest glibc and dash releases, breaking wmiir and wmiirc
respectively.

Thank you.

I noticed a problem on a machine at work running Ubuntu, essentially due
to this construction in the event loop:

wmiir read /event | awk '/./ { print; fflush() } END { print "" }'

It seems Ubuntu installs 'mawk' for providing 'awk', which by default
buffers its input, so the above won't do anything. Ubuntu users will
have to install 'original-awk' and symlink/rename that to awk, or - even
worse - use some obscure '-W interactive' option from mawk in the above
line.

I really do hate mawk with a passion. It's given me trouble before by resolutely freezing given the right script.

Are you sure that input buffering is the problem? Usually, in cases like this, input buffers are flushed as soon as a newline is read. I rather suspect that it's the fflush call that's the problem. Perhaps fflush("") would do the job.

--
Kris Maglione

Don't surrender your loneliness / So quickly.  / Let it cut more
deeply.  / Let it ferment and season you / As few human / Or even
divine ingredients can.
        --Hafez


Reply via email to