Package jnr.constants.platform

Examples of jnr.constants.platform.Errno


                //                    if (setvbuf(fptr.stdio_file, NULL, _IOLBF, BUFSIZ) != 0)
                //                        rb_warn("setvbuf() can't be honoured for %"PRIsVALUE, fptr.pathv);
                //                }
            } else {
                ChannelFD tmpfd = sysopen(runtime, fptr.getPath(), oflags_p[0], 0666);
                Errno err = null;
                if (fptr.cloexecDup2(fptr.posix, tmpfd, fptr.fd()) < 0)
                    err = fptr.errno();

                if (err != null) {
                    throw runtime.newErrnoFromErrno(err, fptr.getPath());
View Full Code Here


    @Override
    public Channel openChannel(ModeFlags flags, int perm) throws ResourceException {
        if (posix.isNative()) {
            int fd = posix.open(absolutePath(), flags.getFlags(), perm);
            if (fd < 0) {
                Errno errno = Errno.valueOf(posix.errno());
                switch (errno) {
                    case EACCES:
                        throw new ResourceException.PermissionDenied(absolutePath());
                    case EEXIST:
                        throw new ResourceException.FileExists(absolutePath());
View Full Code Here

            retry: while (true) {
                stat_loc[0] = 0;
                // TODO: investigate WNOHANG
                int result = runtime.getPosix().waitpid((int)finalPid, stat_loc, 0);
                if (result == -1) {
                    Errno errno = Errno.valueOf(runtime.getPosix().errno());
                    switch (errno) {
                        case EINTR:
                            runtime.getCurrentContext().pollThreadEvents();
                            continue retry;
                        case ECHILD:
View Full Code Here

        return child.getPid();
    }

    private static Errno mapErrorToErrno(int error) {
        Errno errno = errorToErrnoMapper.get(error);
        if (errno == null) {
            errno = __UNKNOWN_CONSTANT__;
        }
        return errno;
    }
View Full Code Here

        return child.getPid();
    }

    private static Errno mapErrorToErrno(int error) {
        Errno errno = errorToErrnoMapper.get(error);
        if (errno == null) {
            errno = __UNKNOWN_CONSTANT__;
        }
        return errno;
    }
View Full Code Here

        try {
            closeable.close();
            return 0;
        } catch (IOException ioe) {
            Errno errno = Helpers.errnoFromException(ioe);
            if (errno == null) {
                throw new RuntimeException("unknown IOException: " + ioe);
            }
            this.errno = errno;
            return -1;
View Full Code Here

        IRubyObject port;
        OpenFile write_fptr;
        IRubyObject write_port;
        PosixShim posix = new PosixShim(runtime.getPosix());

        Errno e = null;

        String[] args = null;
        String[] envp = null;

        ExecArg sargp = new ExecArg();
View Full Code Here

TOP

Related Classes of jnr.constants.platform.Errno

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.