Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 301 for fd (0.14 sec)

  1. src/net/tcpsock.go

    	}
    	return nil
    }
    
    // CloseWrite shuts down the writing side of the TCP connection.
    // Most callers should just use Close.
    func (c *TCPConn) CloseWrite() error {
    	if !c.ok() {
    		return syscall.EINVAL
    	}
    	if err := c.fd.closeWrite(); err != nil {
    		return &OpError{Op: "close", Net: c.fd.net, Source: c.fd.laddr, Addr: c.fd.raddr, Err: err}
    	}
    	return nil
    }
    
    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/syscall/syscall_darwin.go

    //sys	Chroot(path string) (err error)
    //sys	Close(fd int) (err error)
    //sys	closedir(dir uintptr) (err error)
    //sys	Dup(fd int) (nfd int, err error)
    //sys	Dup2(from int, to int) (err error)
    //sys	Exchangedata(path1 string, path2 string, options int) (err error)
    //sys	Fchdir(fd int) (err error)
    //sys	Fchflags(fd int, flags int) (err error)
    //sys	Fchmod(fd int, mode uint32) (err error)
    //sys	Fchown(fd int, uid int, gid int) (err error)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 11K bytes
    - Viewed (0)
  3. cni/pkg/nodeagent/fakes_test.go

    type fakeNs struct {
    	closed *atomic.Bool
    	fd     uintptr
    	inode  uint64
    }
    
    func newFakeNs(fd uintptr) *fakeNs {
    	// the fake inode is the fd! magic.
    	return &fakeNs{closed: &atomic.Bool{}, fd: fd, inode: uint64(fd)}
    }
    
    func newFakeNsInode(fd uintptr, inode uint64) *fakeNs {
    	return &fakeNs{closed: &atomic.Bool{}, fd: fd, inode: inode}
    }
    
    // Fd returns the file descriptor
    func (f *fakeNs) Fd() uintptr {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 12 21:47:31 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  4. src/net/iprawsock_posix.go

    	}
    	sa, err := addr.sockaddr(c.fd.family)
    	if err != nil {
    		return 0, err
    	}
    	return c.fd.writeTo(b, sa)
    }
    
    func (c *IPConn) writeMsg(b, oob []byte, addr *IPAddr) (n, oobn int, err error) {
    	if c.fd.isConnected {
    		return 0, 0, ErrWriteToConnected
    	}
    	if addr == nil {
    		return 0, 0, errMissingAddress
    	}
    	sa, err := addr.sockaddr(c.fd.family)
    	if err != nil {
    		return 0, 0, err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:54:32 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  5. src/runtime/debug/stack.go

    		// reissued the fd in a later call to open(2), leading
    		// to crashes being written to the wrong file.
    		//
    		// So, we duplicate the fd to obtain a private one
    		// that cannot be closed by the user.
    		// This also alleviates us from concerns about the
    		// lifetime and finalization of f.
    		// (DupCloseOnExec returns an fd, not a *File, so
    		// there is no finalizer, and we are responsible for
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 15:19:04 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  6. src/syscall/exec_plan9.go

    		}
    	}
    
    	// Pass 1: look for fd[i] < i and move those up above len(fd)
    	// so that pass 2 won't stomp on an fd it needs later.
    	if pipe < nextfd {
    		r1, _, _ = RawSyscall(SYS_DUP, uintptr(pipe), uintptr(nextfd), 0)
    		if int32(r1) == -1 {
    			goto childerror
    		}
    		pipe = nextfd
    		nextfd++
    	}
    	for i = 0; i < len(fd); i++ {
    		if fd[i] >= 0 && fd[i] < i {
    			if nextfd == pipe { // don't stomp on pipe
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  7. src/net/splice_linux.go

    		remain, r = lr.N, lr.R
    		if remain <= 0 {
    			return 0, nil, true
    		}
    	}
    
    	var s *netFD
    	switch v := r.(type) {
    	case *TCPConn:
    		s = v.fd
    	case tcpConnWithoutWriteTo:
    		s = v.fd
    	case *UnixConn:
    		if v.fd.net != "unix" {
    			return 0, nil, false
    		}
    		s = v.fd
    	default:
    		return 0, nil, false
    	}
    
    	written, handled, err = pollSplice(&c.pfd, &s.pfd, remain)
    	if lr != nil {
    		lr.N -= written
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:49:26 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  8. src/net/tcpconn_keepalive_posix_test.go

    	"time"
    )
    
    func getCurrentKeepAliveSettings(fd fdType) (cfg KeepAliveConfig, err error) {
    	tcpKeepAlive, err := syscall.GetsockoptInt(fd, syscall.SOL_SOCKET, syscall.SO_KEEPALIVE)
    	if err != nil {
    		return
    	}
    	tcpKeepAliveIdle, err := syscall.GetsockoptInt(fd, syscall.IPPROTO_TCP, syscall_TCP_KEEPIDLE)
    	if err != nil {
    		return
    	}
    	tcpKeepAliveInterval, err := syscall.GetsockoptInt(fd, syscall.IPPROTO_TCP, syscall_TCP_KEEPINTVL)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 16:02:18 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  9. src/net/tcpsock_plan9.go

    	if err != nil {
    		return nil, err
    	}
    	return newTCPConn(fd, ln.lc.KeepAlive, ln.lc.KeepAliveConfig, testPreHookSetKeepAlive, testHookSetKeepAlive), nil
    }
    
    func (ln *TCPListener) close() error {
    	if err := ln.fd.pfd.Close(); err != nil {
    		return err
    	}
    	if _, err := ln.fd.ctl.WriteString("hangup"); err != nil {
    		ln.fd.ctl.Close()
    		return err
    	}
    	if err := ln.fd.ctl.Close(); err != nil {
    		return err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 06:04:31 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  10. src/net/tcpsockopt_solaris.go

    	runtime.KeepAlive(fd)
    	return wrapSyscallError("setsockopt", err)
    }
    
    func setKeepAliveCount(fd *netFD, n int) error {
    	if !unix.SupportTCPKeepAliveIdleIntvlCNT() {
    		return syscall.EPROTOTYPE
    	}
    
    	if n == 0 {
    		n = defaultTCPKeepAliveCount
    	} else if n < 0 {
    		return nil
    	}
    	err := fd.pfd.SetsockoptInt(syscall.IPPROTO_TCP, sysTCP_KEEPCNT, n)
    	runtime.KeepAlive(fd)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 03:10:07 UTC 2024
    - 3.3K bytes
    - Viewed (0)
Back to top