pub fn write_to_pipe(fd: Sender, data: &[u8]) -> Result<(), ProcessFunError>
Write data to a pipe and close it