@@ -375,11 +375,13 @@ - (void)close { if (_readPipe[0] == -1) @throw [OFNotOpenException exceptionWithObject: self]; - [self closeForWriting]; + if (_writePipe[1] != -1) + [self closeForWriting]; + close(_readPipe[0]); if (_pid != -1) { kill(_pid, SIGTERM); waitpid(_pid, &_status, WNOHANG);