if (!FilenoUtil.isFake(fileno)) {
// try using existing ChannelFD, then fall back on creating a new one
fd = runtime.getFilenoUtil().getWrapperFromFileno(fileno);
if (fd == null) {
fd = new ChannelFD(new NativeDeviceChannel(fileno), runtime.getPosix(), runtime.getFilenoUtil());
}
} else {
ChannelFD descriptor = runtime.getFilenoUtil().getWrapperFromFileno(fileno);
if (descriptor == null) throw runtime.newErrnoEBADFError();