int perm;
IRubyObject cmd;
Object pm = EncodingUtils.vmodeVperm(vmode, vperm);
IOEncodable convconfig = new IOEncodable.ConvConfig();
EncodingUtils.extractModeEncoding(context, convconfig, pm, opt, oflags_p, fmode_p);
perm = (vperm(pm) == null || vperm(pm).isNil()) ? 0666 : RubyNumeric.num2int(vperm(pm));
if (!(cmd = PopenExecutor.checkPipeCommand(context, filename)).isNil()) {
return PopenExecutor.pipeOpen(context, cmd, OpenFile.ioOflagsModestr(runtime, oflags_p[0]), fmode_p[0], convconfig);