public static void rb_maygvl_fd_fix_cloexec(Ruby runtime, int fd) { PosixShim shim = new PosixShim(runtime); OpenFile.fdFixCloexec(shim, fd); } }
public static void rb_maygvl_fd_fix_cloexec(Ruby runtime, int fd) { PosixShim shim = new PosixShim(runtime); OpenFile.fdFixCloexec(shim, fd); } }
fdFixCloexec(posix, ret); return ret;
fdFixCloexec(posix, ret); return ret;
public static ChannelFD cloexecOpen(Ruby runtime, Sysopen data) { Channel ret = null; if (OpenFlags.O_CLOEXEC.defined()) { data.oflags |= OpenFlags.O_CLOEXEC.intValue(); } else { // #elif defined O_NOINHERIT // flags |= O_NOINHERIT; } PosixShim shim = new PosixShim(runtime); ret = shim.open(runtime.getCurrentDirectory(), data.fname, data.oflags, data.perm); if (ret == null) { data.errno = shim.errno; return null; } ChannelFD fd = new ChannelFD(ret, runtime.getPosix(), runtime.getFilenoUtil()); if (fd.realFileno > 0 && runtime.getPosix().isNative()) { OpenFile.fdFixCloexec(shim, fd.realFileno); } return fd; }
public static ChannelFD cloexecOpen(Ruby runtime, Sysopen data) { Channel ret = null; if (OpenFlags.O_CLOEXEC.defined()) { data.oflags |= OpenFlags.O_CLOEXEC.intValue(); } else { // #elif defined O_NOINHERIT // flags |= O_NOINHERIT; } PosixShim shim = new PosixShim(runtime); ret = shim.open(runtime.getCurrentDirectory(), data.fname, data.oflags, data.perm); if (ret == null) { data.errno = shim.errno; return null; } ChannelFD fd = new ChannelFD(ret, runtime.getPosix(), runtime.getFilenoUtil()); if (fd.realFileno > 0 && runtime.getPosix().isNative()) { OpenFile.fdFixCloexec(shim, fd.realFileno); } return fd; }
OpenFile.fdFixCloexec(fptr.posix, fptr.fd().realFileno);
OpenFile.fdFixCloexec(fptr.posix, fptr.fd().realFileno);