Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 216 for EINVAL (0.33 sec)

  1. src/runtime/runtime_linux_test.go

    	}
    }
    
    // Test that error values are negative.
    // Use a misaligned pointer to get -EINVAL.
    func TestMincoreErrorSign(t *testing.T) {
    	var dst byte
    	v := Mincore(unsafe.Add(unsafe.Pointer(new(int32)), 1), 1, &dst)
    
    	const EINVAL = 0x16
    	if v != -EINVAL {
    		t.Errorf("mincore = %v, want %v", v, -EINVAL)
    	}
    }
    
    func TestKernelStructSize(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 20:20:01 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  2. src/runtime/cgo_sigaction.go

    			systemstack(func() {
    				ret = callCgoSigaction(uintptr(sig), new, old)
    			})
    		}
    
    		const EINVAL = 22
    		if ret == EINVAL {
    			// libc reserves certain signals — normally 32-33 — for pthreads, and
    			// returns EINVAL for sigaction calls on those signals.  If we get EINVAL,
    			// fall back to making the syscall directly.
    			sysSigaction(sig, new, old)
    		}
    	}
    
    	if msanenabled && old != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 05 17:54:15 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  3. 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)
  4. src/cmd/vendor/golang.org/x/sys/unix/sockcmsg_linux.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: Tue Nov 09 20:10:21 UTC 2021
    - 2.6K bytes
    - Viewed (0)
  5. src/internal/testenv/testenv_unix.go

    			// User lacks permission: either the call requires root permission and the
    			// user is not root, or the call is denied by a container security policy.
    			return true
    		case syscall.EINVAL:
    			// Some containers return EINVAL instead of EPERM if a system call is
    			// denied by security policy.
    			return true
    		}
    	}
    
    	if errors.Is(err, fs.ErrPermission) || errors.Is(err, errors.ErrUnsupported) {
    		return true
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 16 17:44:01 UTC 2023
    - 994 bytes
    - Viewed (0)
  6. src/syscall/syscall_bsd.go

    		return nil, 0, EINVAL
    	}
    	sa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL
    	sa.raw.Family = AF_UNIX
    	for i := 0; i < n; i++ {
    		sa.raw.Path[i] = int8(name[i])
    	}
    	return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
    }
    
    func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {
    	if sa.Index == 0 {
    		return nil, 0, EINVAL
    	}
    	sa.raw.Len = sa.Len
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 07 10:34:48 UTC 2023
    - 13.6K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/sys/unix/syscall_bsd.go

    		return nil, 0, EINVAL
    	}
    	sa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL
    	sa.raw.Family = AF_UNIX
    	for i := 0; i < n; i++ {
    		sa.raw.Path[i] = int8(name[i])
    	}
    	return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
    }
    
    func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {
    	if sa.Index == 0 {
    		return nil, 0, EINVAL
    	}
    	sa.raw.Len = sa.Len
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 29 21:28:33 UTC 2023
    - 15K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. src/net/file_unix.go

    	}
    	fd.Close()
    	return nil, syscall.EINVAL
    }
    
    func fileListener(f *os.File) (Listener, error) {
    	fd, err := newFileFD(f)
    	if err != nil {
    		return nil, err
    	}
    	switch laddr := fd.laddr.(type) {
    	case *TCPAddr:
    		return &TCPListener{fd: fd}, nil
    	case *UnixAddr:
    		return &UnixListener{fd: fd, path: laddr.Name, unlink: false}, nil
    	}
    	fd.Close()
    	return nil, syscall.EINVAL
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 06:04:31 UTC 2024
    - 2.5K bytes
    - Viewed (0)
Back to top