public int fcntlGetFD(int fd) { int ret = posix.fcntl(fd, Fcntl.F_GETFD); return ret; }
static int redirectCloexecDup(Ruby runtime, int oldfd) { int ret = redirectDup(runtime, oldfd); int flags = runtime.getPosix().fcntl(ret, Fcntl.F_GETFD); runtime.getPosix().fcntlInt(ret, Fcntl.F_SETFD, flags | FcntlLibrary.FD_CLOEXEC); return ret; }
static int redirectCloexecDup(Ruby runtime, int oldfd) { int ret = redirectDup(runtime, oldfd); int flags = runtime.getPosix().fcntl(ret, Fcntl.F_GETFD); runtime.getPosix().fcntlInt(ret, Fcntl.F_SETFD, flags | FcntlLibrary.FD_CLOEXEC); return ret; }
public int fcntlGetFD(int fd) { int ret = posix.fcntl(fd, Fcntl.F_GETFD); return ret; }
static int redirectDup(Ruby runtime, int oldfd) { // Partial impl of rb_cloexec_fcntl_dup int ret; ret = runtime.getPosix().dup(oldfd); int flags = runtime.getPosix().fcntl(ret, Fcntl.F_GETFD); runtime.getPosix().fcntlInt(ret, Fcntl.F_SETFD, flags | FcntlLibrary.FD_CLOEXEC); return ret; }
public int fcntl(int fd, Fcntl fcntlConst, int... arg) { return posix().fcntl(fd, fcntlConst); }
static int redirectDup(Ruby runtime, int oldfd) { // Partial impl of rb_cloexec_fcntl_dup int ret; ret = runtime.getPosix().dup(oldfd); int flags = runtime.getPosix().fcntl(ret, Fcntl.F_GETFD); runtime.getPosix().fcntlInt(ret, Fcntl.F_SETFD, flags | FcntlLibrary.FD_CLOEXEC); return ret; }
public int fcntl(int fd, Fcntl fcntlConst, int... arg) { return posix().fcntl(fd, fcntlConst); }
public int setCloexec(int fd, boolean cloexec) { int ret = posix.fcntl(fd, Fcntl.F_GETFD); if (ret == -1) { errno = Errno.valueOf(posix.errno()); return -1; } if ( (cloexec && (ret & FcntlLibrary.FD_CLOEXEC) == FcntlLibrary.FD_CLOEXEC) || (!cloexec && (ret & FcntlLibrary.FD_CLOEXEC) == 0)) { return 0; } ret = cloexec ? ret | FcntlLibrary.FD_CLOEXEC : ret & ~FcntlLibrary.FD_CLOEXEC; ret = posix.fcntlInt(fd, Fcntl.F_SETFD, ret); if (ret == -1) errno = Errno.valueOf(posix.errno()); return ret; }
public int fcntl(int fd, Fcntl fcntlConst) { try { return posix.fcntl(fd, fcntlConst); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); } }
public int setCloexec(int fd, boolean cloexec) { int ret = posix.fcntl(fd, Fcntl.F_GETFD); if (ret == -1) { errno = Errno.valueOf(posix.errno()); return -1; } if ( (cloexec && (ret & FcntlLibrary.FD_CLOEXEC) == FcntlLibrary.FD_CLOEXEC) || (!cloexec && (ret & FcntlLibrary.FD_CLOEXEC) == 0)) { return 0; } ret = cloexec ? ret | FcntlLibrary.FD_CLOEXEC : ret & ~FcntlLibrary.FD_CLOEXEC; ret = posix.fcntlInt(fd, Fcntl.F_SETFD, ret); if (ret == -1) errno = Errno.valueOf(posix.errno()); return ret; }
public int fcntl(int fd, Fcntl fcntlConst) { return posix().fcntl(fd, fcntlConst); }
public int fcntl(int fd, Fcntl fcntlConst, int... arg) { return posix().fcntl(fd, fcntlConst); }
public int fcntl(int fd, Fcntl fcntlConst) { try { return posix.fcntl(fd, fcntlConst); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); } }
public int fcntl(int fd, Fcntl fcntlConst) { return posix().fcntl(fd, fcntlConst); }
public int fcntl(int fd, Fcntl fcntlConst, int... arg) { try { return posix.fcntl(fd, fcntlConst); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); } }
public int fcntl(int fd, Fcntl fcntlConst) { return posix().fcntl(fd, fcntlConst); }
public int fcntl(int fd, Fcntl fcntlConst, int... arg) { try { return posix.fcntl(fd, fcntlConst); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); } }
public int fcntl(int fd, Fcntl fcntlConst) { try { return posix.fcntl(fd, fcntlConst); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); } }
public int fcntl(int fd, Fcntl fcntlConst, int... arg) { try { return posix.fcntl(fd, fcntlConst); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); } }