@@ -381,11 +381,13 @@ - (void)close { if (_readPipe[0] == NULL) @throw [OFNotOpenException exceptionWithObject: self]; - [self closeForWriting]; + if (_writePipe[1] != NULL) + [self closeForWriting]; + CloseHandle(_readPipe[0]); if (_handle != INVALID_HANDLE_VALUE) { TerminateProcess(_handle, 0); CloseHandle(_handle);