Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 94 for EBADF (0.05 sec)

  1. src/runtime/fds_unix.go

    	}
    
    	const (
    		// F_GETFD, EBADF, O_RDWR are standard across all unixes we support, so
    		// we define them here rather than in each of the OS specific files.
    		F_GETFD = 0x01
    		EBADF   = 0x09
    		O_RDWR  = 0x02
    	)
    
    	devNull := []byte("/dev/null\x00")
    	for i := 0; i < 3; i++ {
    		ret, errno := fcntl(int32(i), F_GETFD, 0)
    		if ret >= 0 {
    			continue
    		}
    
    		if errno != EBADF {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 27 22:20:25 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  2. src/internal/runtime/syscall/syscall_linux_test.go

    import (
    	"internal/runtime/syscall"
    	"testing"
    )
    
    func TestEpollctlErrorSign(t *testing.T) {
    	v := syscall.EpollCtl(-1, 1, -1, &syscall.EpollEvent{})
    
    	const EBADF = 0x09
    	if v != EBADF {
    		t.Errorf("epollctl = %v, want %v", v, EBADF)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 21:28:32 UTC 2024
    - 423 bytes
    - Viewed (0)
  3. src/runtime/nbpipe_test.go

    	}
    	val, errno := runtime.Fcntl(r, syscall.F_GETFD, 0)
    	if val != -1 {
    		t.Errorf("Fcntl succeeded unexpectedly")
    	} else if syscall.Errno(errno) != syscall.EBADF {
    		t.Errorf("Fcntl failed with error %v, expected %v", syscall.Errno(errno), syscall.EBADF)
    	}
    }
    
    func checkIsPipe(t *testing.T, r, w int32) {
    	bw := byte(42)
    	if n := runtime.Write(uintptr(w), unsafe.Pointer(&bw), 1); n != 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 20 20:32:54 UTC 2023
    - 2K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/testcshared/testdata/main2.c

      // give a chance to get opened.
      for (i = 0; i < 200; i++) {
        n = read(fd, buf, sizeof buf);
        if (n >= 0)
          break;
        if (errno != EBADF && errno != EINVAL) {
          fprintf(stderr, "BUG: read: %s\n", strerror(errno));
          return 2;
        }
    
        // An EBADF error means that the shared library has not opened the
        // descriptor yet.
        ts.tv_sec = 0;
        ts.tv_nsec = 10000000;
        nanosleep(&ts, NULL);
      }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  5. src/runtime/internal/wasitest/testdata/tcpecho.go

    	// we skip fds that aren't sockets. Once we reach EBADF we know there
    	// are no more pre-opens.
    	for preopenFd := uintptr(3); ; preopenFd++ {
    		f := os.NewFile(preopenFd, "")
    		l, err := net.FileListener(f)
    		f.Close()
    
    		var se syscall.Errno
    		switch errors.As(err, &se); se {
    		case syscall.ENOTSOCK:
    			continue
    		case syscall.EBADF:
    			err = nil
    		}
    		return l, err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 25 00:12:41 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  6. src/os/exec/internal/fdtest/exists_unix.go

    package fdtest
    
    import (
    	"syscall"
    )
    
    // Exists returns true if fd is a valid file descriptor.
    func Exists(fd uintptr) bool {
    	var s syscall.Stat_t
    	err := syscall.Fstat(int(fd), &s)
    	return err != syscall.EBADF
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 07 23:34:21 UTC 2023
    - 487 bytes
    - Viewed (0)
  7. src/runtime/defs_solaris.go

    #include <sys/fork.h>
    #include <sys/port.h>
    #include <semaphore.h>
    #include <errno.h>
    #include <signal.h>
    #include <pthread.h>
    #include <netdb.h>
    */
    import "C"
    
    const (
    	EINTR       = C.EINTR
    	EBADF       = C.EBADF
    	EFAULT      = C.EFAULT
    	EAGAIN      = C.EAGAIN
    	EBUSY       = C.EBUSY
    	ETIME       = C.ETIME
    	ETIMEDOUT   = C.ETIMEDOUT
    	EWOULDBLOCK = C.EWOULDBLOCK
    	EINPROGRESS = C.EINPROGRESS
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 24 17:47:39 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  8. src/syscall/tables_wasip1.go

    const (
    	E2BIG           Errno = 1
    	EACCES          Errno = 2
    	EADDRINUSE      Errno = 3
    	EADDRNOTAVAIL   Errno = 4
    	EAFNOSUPPORT    Errno = 5
    	EAGAIN          Errno = 6
    	EALREADY        Errno = 7
    	EBADF           Errno = 8
    	EBADMSG         Errno = 9
    	EBUSY           Errno = 10
    	ECANCELED       Errno = 11
    	ECHILD          Errno = 12
    	ECONNABORTED    Errno = 13
    	ECONNREFUSED    Errno = 14
    	ECONNRESET      Errno = 15
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 06 20:58:35 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  9. src/syscall/zerrors_windows.go

    // Invented values to support what package os and others expects.
    const (
    	E2BIG Errno = APPLICATION_ERROR + iota
    	EACCES
    	EADDRINUSE
    	EADDRNOTAVAIL
    	EADV
    	EAFNOSUPPORT
    	EAGAIN
    	EALREADY
    	EBADE
    	EBADF
    	EBADFD
    	EBADMSG
    	EBADR
    	EBADRQC
    	EBADSLT
    	EBFONT
    	EBUSY
    	ECANCELED
    	ECHILD
    	ECHRNG
    	ECOMM
    	ECONNABORTED
    	ECONNREFUSED
    	ECONNRESET
    	EDEADLK
    	EDEADLOCK
    	EDESTADDRREQ
    	EDOM
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 14 13:21:46 UTC 2018
    - 10K bytes
    - Viewed (0)
  10. src/syscall/tables_js.go

    	"ENOENT":          ENOENT,
    	"ESRCH":           ESRCH,
    	"EINTR":           EINTR,
    	"EIO":             EIO,
    	"ENXIO":           ENXIO,
    	"E2BIG":           E2BIG,
    	"ENOEXEC":         ENOEXEC,
    	"EBADF":           EBADF,
    	"ECHILD":          ECHILD,
    	"EAGAIN":          EAGAIN,
    	"ENOMEM":          ENOMEM,
    	"EACCES":          EACCES,
    	"EFAULT":          EFAULT,
    	"EBUSY":           EBUSY,
    	"EEXIST":          EEXIST,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 19.2K bytes
    - Viewed (0)
Back to top