- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for SetNonblock (0.34 sec)
-
src/os/pipe_test.go
func TestReadNonblockingFd(t *testing.T) { switch runtime.GOOS { case "windows": t.Skip("Windows doesn't support SetNonblock") } if os.Getenv("GO_WANT_READ_NONBLOCKING_FD") == "1" { fd := syscallDescriptor(os.Stdin.Fd()) syscall.SetNonblock(fd, true) defer syscall.SetNonblock(fd, false) _, err := os.Stdin.Read(make([]byte, 1)) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 05 23:35:29 UTC 2023 - 12.4K bytes - Viewed (0) -
src/syscall/fs_wasip1.go
// runtime supports non-blocking stdio, the Go runtime is able to // use the WASI net poller to poll for read/write readiness and is // able to schedule goroutines while waiting. SetNonblock(0, true) SetNonblock(1, true) SetNonblock(2, true) } type uintptr32 = uint32 type size = uint32 type fdflags = uint32 type filesize = uint64 type filetype = uint8 type lookupflags = uint32 type oflags = uint32
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 19:57:43 UTC 2024 - 24.1K bytes - Viewed (0) -
src/os/os_unix_test.go
t.Fatalf("pipe: %v", err) } defer syscall.Close(p[1]) // Set the read-side to non-blocking. if !blocking { if err := syscall.SetNonblock(p[0], true); err != nil { syscall.Close(p[0]) t.Fatalf("SetNonblock: %v", err) } } // Convert it to a file. file := NewFile(uintptr(p[0]), "notapipe") if file == nil { syscall.Close(p[0])
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:32:43 UTC 2023 - 11.5K bytes - Viewed (0) -
src/os/file_unix.go
// non-blocking mode. if nonBlocking { // See the comments on net_newUnixFile. if kind == kindSock { f.nonblock = true // tell Fd to return blocking descriptor } } else if err := syscall.SetNonblock(fd, true); err == nil { f.nonblock = true clearNonBlock = true } else { pollable = false } } // An error here indicates a failure to register
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 13:52:34 UTC 2024 - 14.9K bytes - Viewed (0) -
src/syscall/exec_windows.go
} b = utf16.AppendRune(b, 0) } b = utf16.AppendRune(b, 0) return b, nil } func CloseOnExec(fd Handle) { SetHandleInformation(Handle(fd), HANDLE_FLAG_INHERIT, 0) } func SetNonblock(fd Handle, nonblocking bool) (err error) { return nil } // FullPath retrieves the full path of the specified file. func FullPath(name string) (path string, err error) { p, err := UTF16PtrFromString(name)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 28 18:29:48 UTC 2023 - 10.3K bytes - Viewed (0) -
src/runtime/os_darwin.go
// buffer is somehow full we will not block in the signal handler. // Leave the read end of the pipe blocking so that we will block // in sigNoteSleep. setNonblock(sigNoteWrite) } // sigNoteWakeup wakes up a thread sleeping on a note created by sigNoteSetup. func sigNoteWakeup(*note) { var b byte write(uintptr(sigNoteWrite), unsafe.Pointer(&b), 1) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 05 20:34:30 UTC 2023 - 11.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sys/unix/syscall_unix.go
if err == nil { fd[0] = int(fdx[0]) fd[1] = int(fdx[1]) } return } var ioSync int64 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: Thu Oct 19 23:33:33 UTC 2023 - 16.5K bytes - Viewed (0) -
src/internal/poll/fd_unix.go
// Atomic store so that concurrent calls to SetBlocking // do not cause a race condition. isBlocking only ever goes // from 0 to 1 so there is no real race here. atomic.StoreUint32(&fd.isBlocking, 1) return syscall.SetNonblock(fd.Sysfd, false) } // Darwin and FreeBSD can't read or write 2GB+ files at a time, // even on 64-bit systems. // The same is true of socket implementations on many systems.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 31 04:09:44 UTC 2024 - 17.9K bytes - Viewed (0) -
src/runtime/sys_darwin.go
return ret } func pthread_cond_signal_trampoline() // Not used on Darwin, but must be defined. func exitThread(wait *atomic.Uint32) { throw("exitThread") } //go:nosplit func setNonblock(fd int32) { flags, _ := fcntl(fd, _F_GETFL, 0) if flags != -1 { fcntl(fd, _F_SETFL, flags|_O_NONBLOCK) } } func issetugid() int32 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:17:26 UTC 2024 - 23.9K bytes - Viewed (0)