Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for IsNonblock (0.14 sec)

  1. src/net/file_unix_test.go

    	err = rawconn.Control(func(fd uintptr) {
    		nonblock, err := unix.IsNonblock(int(fd))
    		if err != nil {
    			t.Fatal(err)
    		}
    		if !nonblock {
    			t.Fatal("unix socket as os.File is in blocking mode")
    		}
    	})
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	fd := file.Fd()
    
    	// Calling Fd should have put the descriptor into blocking mode.
    	nonblock, err := unix.IsNonblock(int(fd))
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 22 16:48:53 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  2. src/internal/syscall/unix/nonblocking_wasip1.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build wasip1
    
    package unix
    
    import (
    	"syscall"
    	_ "unsafe" // for go:linkname
    )
    
    func IsNonblock(fd int) (nonblocking bool, err error) {
    	flags, e1 := fd_fdstat_get_flags(fd)
    	if e1 != nil {
    		return false, e1
    	}
    	return flags&syscall.FDFLAG_NONBLOCK != 0, nil
    }
    
    func HasNonblockFlag(flag int) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:12:04 UTC 2023
    - 787 bytes
    - Viewed (0)
  3. src/internal/syscall/unix/nonblocking_js.go

    // Copyright 2018 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build js && wasm
    
    package unix
    
    func IsNonblock(fd int) (nonblocking bool, err error) {
    	return false, nil
    }
    
    func HasNonblockFlag(flag int) bool {
    	return false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:12:04 UTC 2023
    - 329 bytes
    - Viewed (0)
  4. src/internal/syscall/unix/nonblocking_unix.go

    // Copyright 2018 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build unix
    
    package unix
    
    import "syscall"
    
    func IsNonblock(fd int) (nonblocking bool, err error) {
    	flag, e1 := Fcntl(fd, syscall.F_GETFL, 0)
    	if e1 != nil {
    		return false, e1
    	}
    	return flag&syscall.O_NONBLOCK != 0, nil
    }
    
    func HasNonblockFlag(flag int) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 18 09:15:25 UTC 2023
    - 468 bytes
    - Viewed (0)
  5. src/os/fifo_test.go

    	}
    	f := os.NewFile(uintptr(p[0]), "pipe")
    	nonblock, err := unix.IsNonblock(p[0])
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer f.Close()
    	if !nonblock {
    		t.Error("pipe blocking after NewFile")
    	}
    	fd := f.Fd()
    	if fd != uintptr(p[0]) {
    		t.Errorf("Fd returned %d, want %d", fd, p[0])
    	}
    	nonblock, err = unix.IsNonblock(p[0])
    	if err != nil {
    		t.Fatal(err)
    	}
    	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)
Back to top