Close the input and output pipes when we've finished with them.