I haven't looked at the problem, but the strange output you get is due
to buffering.  If you need to be sure that something is actually
printed, you need to flush the stream.

Reply via email to