flush output to parent as soon as it's ready