Fixes #7, making the parent wait until child has finished printing.