Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 50 for EINVAL (0.16 sec)

  1. src/net/tcpsock.go

    func (c *TCPConn) SyscallConn() (syscall.RawConn, error) {
    	if !c.ok() {
    		return nil, syscall.EINVAL
    	}
    	return newRawConn(c.fd), nil
    }
    
    // ReadFrom implements the [io.ReaderFrom] ReadFrom method.
    func (c *TCPConn) ReadFrom(r io.Reader) (int64, error) {
    	if !c.ok() {
    		return 0, syscall.EINVAL
    	}
    	n, err := c.readFrom(r)
    	if err != nil && err != io.EOF {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 03:10:07 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  2. src/os/exec_windows.go

    func (p *Process) release() error {
    	// Drop the Process' reference and mark handle unusable for
    	// future calls.
    	//
    	// The API on Windows expects EINVAL if Release is called multiple
    	// times.
    	if old := p.handlePersistentRelease(statusReleased); old == statusReleased {
    		return syscall.EINVAL
    	}
    
    	// no need for a finalizer anymore
    	runtime.SetFinalizer(p, nil)
    	return nil
    }
    
    func (p *Process) closeHandle() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 5K bytes
    - Viewed (0)
  3. src/internal/poll/sendfile_bsd.go

    		if n > 0 {
    			pos += int64(n)
    			written += int64(n)
    			remain -= int64(n)
    		}
    		if err == syscall.EINTR {
    			continue
    		}
    		// This includes syscall.ENOSYS (no kernel
    		// support) and syscall.EINVAL (fd types which
    		// don't implement sendfile), and other errors.
    		// We should end the loop when there is no error
    		// returned from sendfile(2) or it is not a retryable error.
    		if err != syscall.EAGAIN {
    			break
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  4. src/internal/poll/sendfile_linux.go

    		if n > 0 {
    			written += int64(n)
    			remain -= int64(n)
    			continue
    		} else if err != syscall.EAGAIN && err != syscall.EINTR {
    			// This includes syscall.ENOSYS (no kernel
    			// support) and syscall.EINVAL (fd types which
    			// don't implement sendfile), and other errors.
    			// We should end the loop when there is no error
    			// returned from sendfile(2) or it is not a retryable error.
    			break
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  5. src/syscall/fs_wasip1.go

    func Stat(path string, st *Stat_t) error {
    	if path == "" {
    		return EINVAL
    	}
    	dirFd, pathPtr, pathLen := preparePath(path)
    	errno := path_filestat_get(dirFd, LOOKUP_SYMLINK_FOLLOW, pathPtr, pathLen, unsafe.Pointer(st))
    	setDefaultMode(st)
    	return errnoErr(errno)
    }
    
    func Lstat(path string, st *Stat_t) error {
    	if path == "" {
    		return EINVAL
    	}
    	dirFd, pathPtr, pathLen := preparePath(path)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/sys/unix/sockcmsg_zos.go

    // SO_PASSCRED option must be enabled on the socket.
    func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
    	if m.Header.Level != SOL_SOCKET {
    		return nil, EINVAL
    	}
    	if m.Header.Type != SCM_CREDENTIALS {
    		return nil, EINVAL
    	}
    	ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
    	return &ucred, nil
    }
    
    // PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 16:12:58 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  7. src/os/exec_test.go

    	}
    	if err := p.Release(); err != nil {
    		t.Fatalf("first Release: got err %v, want nil", err)
    	}
    
    	err = p.Release()
    
    	// We want EINVAL from a second Release call only on Windows.
    	var want error
    	if runtime.GOOS == "windows" {
    		want = syscall.EINVAL
    	}
    
    	if err != want {
    		t.Fatalf("second Release: got err %v, want %v", err, want)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 18:08:44 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  8. src/internal/poll/sendfile_solaris.go

    			pos += int64(n)
    			written += int64(n)
    			remain -= int64(n)
    			continue
    		} else if err != syscall.EAGAIN && err != syscall.EINTR {
    			// This includes syscall.ENOSYS (no kernel
    			// support) and syscall.EINVAL (fd types which
    			// don't implement sendfile), and other errors.
    			// We should end the loop when there is no error
    			// returned from sendfile(2) or it is not a retryable error.
    			break
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  9. src/syscall/dirent_test.go

    		t.Fatalf("syscall.open: %v", err)
    	}
    	defer syscall.Close(fd)
    
    	buf := bytes.Repeat([]byte{0xCD}, direntBufSize)
    	for {
    		n, err := syscall.ReadDirent(fd, buf)
    		if err == syscall.EINVAL {
    			// On linux, 'man getdents64' says that EINVAL indicates “result buffer is too small”.
    			// Try a bigger buffer.
    			t.Logf("ReadDirent: %v; retrying with larger buffer", err)
    			buf = bytes.Repeat([]byte{0xCD}, len(buf)*2)
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  10. src/syscall/syscall_linux.go

    }
    
    func Utimes(path string, tv []Timeval) (err error) {
    	if len(tv) != 2 {
    		return EINVAL
    	}
    	return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
    }
    
    //sys	utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error)
    
    func UtimesNano(path string, ts []Timespec) (err error) {
    	if len(ts) != 2 {
    		return EINVAL
    	}
    	return utimensat(_AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 20:12:46 UTC 2024
    - 35.7K bytes
    - Viewed (0)
Back to top