- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for SetNonblock (0.59 sec)
-
src/net/sock_cloexec_solaris.go
if err == nil { syscall.CloseOnExec(s) } syscall.ForkLock.RUnlock() if err != nil { return -1, os.NewSyscallError("socket", err) } if err = syscall.SetNonblock(s, true); err != nil { poll.CloseFunc(s) return -1, os.NewSyscallError("setnonblock", err) } return s, nil
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Apr 14 18:17:25 UTC 2024 - 1.4K bytes - Viewed (0) -
src/internal/poll/sock_cloexec_solaris.go
ns, sa, err := AcceptFunc(s) if err == nil { syscall.CloseOnExec(ns) } if err != nil { return -1, nil, "accept", err } if err = syscall.SetNonblock(ns, true); err != nil { CloseFunc(ns) return -1, nil, "setnonblock", err } return ns, sa, "", nil
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Apr 14 18:17:25 UTC 2024 - 1.5K bytes - Viewed (0) -
src/net/file_unix.go
s, call, err := poll.DupCloseOnExec(int(f.Fd())) if err != nil { if call != "" { err = os.NewSyscallError(call, err) } return -1, err } if err := syscall.SetNonblock(s, true); err != nil { poll.CloseFunc(s) return -1, os.NewSyscallError("setnonblock", err) } return s, nil } func newFileFD(f *os.File) (*netFD, error) { s, err := dupSocket(f) if err != nil { return nil, err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 20 06:04:31 UTC 2024 - 2.5K bytes - Viewed (0) -
src/net/sock_cloexec.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file implements sysSocket for platforms that provide a fast path for // setting SetNonblock and CloseOnExec. //go:build dragonfly || freebsd || linux || netbsd || openbsd package net import ( "os" "syscall" ) // Wrapper around the socket system call that marks the returned file
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Apr 14 18:17:25 UTC 2024 - 730 bytes - Viewed (0) -
src/runtime/netpoll_fake.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Fake network poller for js/wasm. // Should never be used, because js/wasm network connections do not honor "SetNonblock". //go:build js && wasm package runtime func netpollinit() { } func netpollIsPollDescriptor(fd uintptr) bool { return false } func netpollopen(fd uintptr, pd *pollDesc) int32 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 15:45:57 UTC 2023 - 664 bytes - Viewed (0) -
src/internal/poll/sock_cloexec.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file implements accept for platforms that provide a fast path for // setting SetNonblock and CloseOnExec. //go:build dragonfly || freebsd || (linux && !arm) || netbsd || openbsd package poll import "syscall" // Wrapper around the accept system call that marks the returned file
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Apr 14 18:17:25 UTC 2024 - 712 bytes - Viewed (0) -
src/os/fifo_test.go
} } func TestNewFileNonBlocking(t *testing.T) { var p [2]int if err := syscall.Pipe(p[:]); err != nil { t.Fatal(err) } if err := syscall.SetNonblock(p[0], true); err != nil { t.Fatal(err) } f := os.NewFile(uintptr(p[0]), "pipe") nonblock, err := unix.IsNonblock(p[0]) if err != nil { t.Fatal(err) } defer f.Close() if !nonblock {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 11:47:23 UTC 2024 - 6.1K bytes - Viewed (0) -
src/runtime/os_aix.go
} //go:nosplit func fcntl(fd, cmd, arg int32) (int32, int32) { r, errno := syscall3(&libc_fcntl, uintptr(fd), uintptr(cmd), uintptr(arg)) return int32(r), int32(errno) } //go:nosplit func setNonblock(fd int32) { flags, _ := fcntl(fd, _F_GETFL, 0) if flags != -1 { fcntl(fd, _F_SETFL, flags|_O_NONBLOCK) } } // sigPerThreadSyscall is only used on linux, so we assign a bogus signal // number.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 8.9K bytes - Viewed (0) -
src/syscall/exec_unix.go
n = 0 for i, s := range ss { bb[i] = &b[n] copy(b[n:], s) n += len(s) + 1 } return bb, nil } func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) } func SetNonblock(fd int, nonblocking bool) (err error) { flag, err := fcntl(fd, F_GETFL, 0) if err != nil { return err } if (flag&O_NONBLOCK != 0) == nonblocking { return nil } if nonblocking {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:03:59 UTC 2024 - 8.7K bytes - Viewed (0) -
src/syscall/syscall_wasip1.go
clockProcessCPUTimeID clockThreadCPUTimeID ) //go:wasmimport wasi_snapshot_preview1 clock_time_get //go:noescape func clock_time_get(id clockid, precision timestamp, time unsafe.Pointer) Errno func SetNonblock(fd int, nonblocking bool) error { flags, err := fd_fdstat_get_flags(fd) if err != nil { return err } if nonblocking { flags |= FDFLAG_NONBLOCK } else { flags &^= FDFLAG_NONBLOCK }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:03:59 UTC 2024 - 9.4K bytes - Viewed (0)