Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for fd (0.03 sec)

  1. src/os/pidfd_linux.go

    	// Get a pidfd of the current process (opening of "/proc/self" won't
    	// work for waitid).
    	fd, err := unix.PidFDOpen(syscall.Getpid(), 0)
    	if err != nil {
    		return NewSyscallError("pidfd_open", err)
    	}
    	defer syscall.Close(int(fd))
    
    	// Check waitid(P_PIDFD) works.
    	for {
    		_, _, err = syscall.Syscall6(syscall.SYS_WAITID, _P_PIDFD, fd, 0, syscall.WEXITED, 0, 0)
    		if err != syscall.EINTR {
    			break
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 18:08:44 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  2. src/os/exec/exec_test.go

    	os.Setenv("GODEBUG", godebug)
    
    	if os.Getenv("GO_EXEC_TEST_PID") != "" {
    		return
    	}
    	if runtime.GOOS == "windows" {
    		return
    	}
    	for fd := uintptr(3); fd <= 100; fd++ {
    		if poll.IsPollDescriptor(fd) {
    			continue
    		}
    
    		if fdtest.Exists(fd) {
    			haveUnexpectedFDs = true
    			return
    		}
    	}
    }
    
    // TestMain allows the test binary to impersonate many other binaries,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:53 UTC 2024
    - 48.4K bytes
    - Viewed (0)
  3. cmd/metacache-set.go

    			fdMu.Lock()
    			defer fdMu.Unlock()
    			if len(fds) == 0 {
    				return nil
    			}
    			fdsCopy := fds
    			for _, fd := range fdsCopy {
    				// Grab a fallback disk
    				fds = fds[1:]
    				if fd != nil && fd.IsOnline() {
    					return fd
    				}
    			}
    		}
    		// Either no more disks for fallback or
    		// not a storage error.
    		return nil
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 22:18:44 UTC 2024
    - 30.4K bytes
    - Viewed (0)
  4. src/os/exec_plan9.go

    	sysattr := &syscall.ProcAttr{
    		Dir: attr.Dir,
    		Env: attr.Env,
    		Sys: attr.Sys,
    	}
    
    	sysattr.Files = make([]uintptr, 0, len(attr.Files))
    	for _, f := range attr.Files {
    		sysattr.Files = append(sysattr.Files, f.Fd())
    	}
    
    	pid, _, e := syscall.StartProcess(name, argv, sysattr)
    	if e != nil {
    		return nil, &PathError{Op: "fork/exec", Path: name, Err: e}
    	}
    
    	return newPIDProcess(pid), nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  5. src/os/exec_posix.go

    		sysattr.Env, err = execenv.Default(sysattr.Sys)
    		if err != nil {
    			return nil, err
    		}
    	}
    	sysattr.Files = make([]uintptr, 0, len(attr.Files))
    	for _, f := range attr.Files {
    		sysattr.Files = append(sysattr.Files, f.Fd())
    	}
    
    	pid, h, e := syscall.StartProcess(name, argv, sysattr)
    
    	// Make sure we don't run the finalizers of attr.Files.
    	runtime.KeepAlive(attr)
    
    	if e != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/telemetry/start.go

    	// but in line with the uploader, log to a file in debug
    	// only if that directory was created by the user.
    	fd, err := os.Stat(telemetry.Default.DebugDir())
    	if err != nil {
    		if !os.IsNotExist(err) {
    			log.Fatalf("failed to stat debug directory: %v", err)
    		}
    	} else if fd.IsDir() {
    		// local/debug exists and is a directory. Set stderr to a log file path
    		// in local/debug.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 14:52:56 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  7. src/os/removeall_at.go

    			pathErr.Path = parentDir + string(PathSeparator) + pathErr.Path
    			err = pathErr
    		}
    		return err
    	}
    	return nil
    }
    
    func removeAllFrom(parent *File, base string) error {
    	parentFd := int(parent.Fd())
    	// Simple case: if Unlink (aka remove) works, we're done.
    	err := ignoringEINTR(func() error {
    		return unix.Unlinkat(parentFd, base, 0)
    	})
    	if err == nil || IsNotExist(err) {
    		return nil
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:09:26 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux.go

    	IFLA_CAN_BITRATE_CONST        = 0xd
    	IFLA_CAN_DATA_BITRATE_CONST   = 0xe
    	IFLA_CAN_BITRATE_MAX          = 0xf
    )
    
    type KCMAttach struct {
    	Fd     int32
    	Bpf_fd int32
    }
    
    type KCMUnattach struct {
    	Fd int32
    }
    
    type KCMClone struct {
    	Fd int32
    }
    
    const (
    	NL80211_AC_BE                                           = 0x2
    	NL80211_AC_BK                                           = 0x3
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 251K bytes
    - Viewed (0)
  9. src/go/printer/printer_test.go

    }`
    	fset := token.NewFileSet()
    	file, err := parser.ParseFile(fset, "", src, 0)
    	if err != nil {
    		panic(err)
    	}
    
    	// Replace the result with call(), which is on the next line.
    	fd := file.Decls[0].(*ast.FuncDecl)
    	ret := fd.Body.List[0].(*ast.ReturnStmt)
    	ret.Results[0] = ret.Results[0].(*ast.CompositeLit).Elts[0]
    
    	var buf bytes.Buffer
    	if err := Fprint(&buf, fset, ret); err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/sys/unix/mkerrors.sh

    		$2 ~ /^HW_MACHINE$/ ||
    		$2 ~ /^SYSCTL_VERS/ ||
    		$2 !~ "MNT_BITS" &&
    		$2 ~ /^(MS|MNT|MOUNT|UMOUNT)_/ ||
    		$2 ~ /^NS_GET_/ ||
    		$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
    		$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|PIOD|TFD)_/ ||
    		$2 ~ /^KEXEC_/ ||
    		$2 ~ /^LINUX_REBOOT_CMD_/ ||
    		$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
    		$2 ~ /^MODULE_INIT_/ ||
    		$2 !~ "NLA_TYPE_MASK" &&
    		$2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ &&
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 20.2K bytes
    - Viewed (0)
Back to top