cross platform pipe read problem