Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 1,010 for SYSCALL (0.13 sec)

  1. internal/http/dial_linux.go

    				_ = syscall.SetsockoptInt(fd, syscall.IPPROTO_TCP, syscall.TCP_KEEPCNT, 5)
    
    				// Wait time after successful probe in seconds.
    				// ~ cat /proc/sys/net/ipv4/tcp_keepalive_intvl (defaults to 75 secs, we reduce it to 15 secs)
    				_ = syscall.SetsockoptInt(fd, syscall.IPPROTO_TCP, syscall.TCP_KEEPINTVL, 15)
    			}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 22 23:07:14 UTC 2024
    - 4.8K bytes
    - Viewed (3)
  2. src/os/dirent_openbsd.go

    	return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Namlen), unsafe.Sizeof(syscall.Dirent{}.Namlen))
    }
    
    func direntType(buf []byte) FileMode {
    	off := unsafe.Offsetof(syscall.Dirent{}.Type)
    	if off >= uintptr(len(buf)) {
    		return ^FileMode(0) // unknown
    	}
    	typ := buf[off]
    	switch typ {
    	case syscall.DT_BLK:
    		return ModeDevice
    	case syscall.DT_CHR:
    		return ModeDevice | ModeCharDevice
    	case syscall.DT_DIR:
    		return ModeDir
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 20 00:59:20 UTC 2020
    - 1.2K bytes
    - Viewed (0)
  3. src/syscall/creds_test.go

    		socketType int
    		dataLen    int
    	}{
    		{
    			syscall.SOCK_STREAM,
    			1,
    		}, {
    			syscall.SOCK_DGRAM,
    			0,
    		},
    	}
    
    	for _, tt := range socketTypeTests {
    		fds, err := syscall.Socketpair(syscall.AF_LOCAL, tt.socketType, 0)
    		if err != nil {
    			t.Fatalf("Socketpair: %v", err)
    		}
    
    		err = syscall.SetsockoptInt(fds[0], syscall.SOL_SOCKET, syscall.SO_PASSCRED, 1)
    		if err != nil {
    			syscall.Close(fds[0])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 17 02:43:05 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  4. src/net/tcpconn_keepalive_posix_test.go

    package net
    
    import (
    	"syscall"
    	"testing"
    	"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
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 16:02:18 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  5. src/os/dirent_freebsd.go

    	return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Namlen), unsafe.Sizeof(syscall.Dirent{}.Namlen))
    }
    
    func direntType(buf []byte) FileMode {
    	off := unsafe.Offsetof(syscall.Dirent{}.Type)
    	if off >= uintptr(len(buf)) {
    		return ^FileMode(0) // unknown
    	}
    	typ := buf[off]
    	switch typ {
    	case syscall.DT_BLK:
    		return ModeDevice
    	case syscall.DT_CHR:
    		return ModeDevice | ModeCharDevice
    	case syscall.DT_DIR:
    		return ModeDir
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 20 00:59:20 UTC 2020
    - 1.2K bytes
    - Viewed (0)
  6. src/net/sockoptip_posix.go

    //go:build unix || windows
    
    package net
    
    import (
    	"runtime"
    	"syscall"
    )
    
    func joinIPv4Group(fd *netFD, ifi *Interface, ip IP) error {
    	mreq := &syscall.IPMreq{Multiaddr: [4]byte{ip[0], ip[1], ip[2], ip[3]}}
    	if err := setIPv4MreqToInterface(mreq, ifi); err != nil {
    		return err
    	}
    	err := fd.pfd.SetsockoptIPMreq(syscall.IPPROTO_IP, syscall.IP_ADD_MEMBERSHIP, mreq)
    	runtime.KeepAlive(fd)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 29 16:24:51 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  7. src/os/dirent_linux.go

    package os
    
    import (
    	"syscall"
    	"unsafe"
    )
    
    func direntIno(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Ino), unsafe.Sizeof(syscall.Dirent{}.Ino))
    }
    
    func direntReclen(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Reclen), unsafe.Sizeof(syscall.Dirent{}.Reclen))
    }
    
    func direntNamlen(buf []byte) (uint64, bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 20 00:59:20 UTC 2020
    - 1.2K bytes
    - Viewed (0)
  8. src/syscall/exec_freebsd_test.go

    	conf[2].SetLen(len(paramPersist))
    	conf[3].Base = nil
    	conf[3].SetLen(0)
    
    	id, _, err1 := syscall.Syscall(syscall.SYS_JAIL_SET,
    		uintptr(unsafe.Pointer(&conf[0])), uintptr(len(conf)), flagJailCreate)
    	if err1 != 0 {
    		t.Fatalf("jail_set: %v", err1)
    	}
    	t.Cleanup(func() {
    		_, _, err1 := syscall.Syscall(syscall.SYS_JAIL_REMOVE, id, 0, 0)
    		if err1 != 0 {
    			t.Errorf("failed to cleanup jail: %v", err)
    		}
    	})
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 22 20:38:48 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  9. src/net/unixsock_plan9.go

    	return 0, 0, syscall.EPLAN9
    }
    
    func (sd *sysDialer) dialUnix(ctx context.Context, laddr, raddr *UnixAddr) (*UnixConn, error) {
    	return nil, syscall.EPLAN9
    }
    
    func (ln *UnixListener) accept() (*UnixConn, error) {
    	return nil, syscall.EPLAN9
    }
    
    func (ln *UnixListener) close() error {
    	return syscall.EPLAN9
    }
    
    func (ln *UnixListener) file() (*os.File, error) {
    	return nil, syscall.EPLAN9
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 29 23:57:04 UTC 2018
    - 1.2K bytes
    - Viewed (0)
  10. src/internal/poll/sock_cloexec_accept.go

    		return -1, sa, "accept4", err
    	case syscall.ENOSYS: // syscall missing
    	case syscall.EINVAL: // some Linux use this instead of ENOSYS
    	case syscall.EACCES: // some Linux use this instead of ENOSYS
    	case syscall.EFAULT: // some Linux use this instead of ENOSYS
    	}
    
    	// See ../syscall/exec_unix.go for description of ForkLock.
    	// It is probably okay to hold the lock across syscall.Accept
    	// because we have put fd.sysfd into non-blocking mode.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 16 03:40:42 UTC 2022
    - 1.8K bytes
    - Viewed (0)
Back to top