Resume partial writes

Ensure the complete buffer is written to stdin of the child process. In
the case of failure, currently the error is ignored.