}
Channel[] mainPipe = null, secondPipe = null;
switch (fmode & (OpenFile.READABLE|OpenFile.WRITABLE)) {
case OpenFile.READABLE | OpenFile.WRITABLE:
if ((secondPipe = posix.pipe()) == null)
throw runtime.newErrnoFromErrno(posix.errno, prog.toString());
if ((mainPipe = posix.pipe()) == null) {
e = posix.errno;
try {secondPipe[1].close();} catch (IOException ioe) {}
try {secondPipe[0].close();} catch (IOException ioe) {}
posix.errno = e;