Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for lockPath (0.3 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go

    	}
    	if tv, ok := pass.TypesInfo.Types[x]; ok && tv.IsValue() {
    		return lockPath(pass.Pkg, tv.Type, nil)
    	}
    	return nil
    }
    
    // lockPath returns a typePath describing the location of a lock value
    // contained in typ. If there is no contained lock, it returns nil.
    //
    // The seen map is used to short-circuit infinite recursion due to type cycles.
    func lockPath(tpkg *types.Package, typ types.Type, seen map[types.Type]bool) typePath {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  2. pkg/volume/util/subpath/subpath_windows.go

    	if fileHandles != nil {
    		for _, handle := range fileHandles {
    			syscall.CloseHandle(syscall.Handle(handle))
    		}
    	}
    }
    
    // lockPath locks a directory or symlink, return handle, exec "syscall.CloseHandle(handle)" to unlock the path
    func lockPath(path string) (uintptr, error) {
    	if len(path) == 0 {
    		return uintptr(syscall.InvalidHandle), syscall.ERROR_FILE_NOT_FOUND
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 23 12:57:11 UTC 2023
    - 12.5K bytes
    - Viewed (0)
  3. misc/go_android_exec/main.go

    	// Concurrent use of adb is flaky, so serialize adb commands.
    	// See https://github.com/golang/go/issues/23795 or
    	// https://issuetracker.google.com/issues/73230216.
    	lockPath := filepath.Join(os.TempDir(), "go_android_exec-adb-lock")
    	lock, err := os.OpenFile(lockPath, os.O_CREATE|os.O_RDWR, 0666)
    	if err != nil {
    		return 0, err
    	}
    	defer lock.Close()
    	if err := syscall.Flock(int(lock.Fd()), syscall.LOCK_EX); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 17:46:57 UTC 2023
    - 15.3K bytes
    - Viewed (0)
  4. src/os/exec/lp_windows_test.go

    				}
    			}
    
    			got, err := exec.LookPath(tt.searchFor)
    			if filepath.IsAbs(got) {
    				got, err = filepath.Rel(root, got)
    				if err != nil {
    					t.Fatal(err)
    				}
    			}
    			if got != tt.want {
    				t.Errorf("LookPath(%#q) = %#q; want %#q", tt.searchFor, got, tt.want)
    			}
    			if !errors.Is(err, tt.wantErr) {
    				t.Errorf("LookPath(%#q): %v; want %v", tt.searchFor, err, tt.wantErr)
    			}
    		})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 19:38:12 UTC 2023
    - 16.3K bytes
    - Viewed (0)
  5. src/runtime/syscall_windows_test.go

    		"testO2",
    		func(out, src string) []string {
    			return []string{"gcc", "-shared", "-s", "-Werror", "-o", out, "-O2", src}
    		},
    	},
    }
    
    func TestStdcallAndCDeclCallbacks(t *testing.T) {
    	if _, err := exec.LookPath("gcc"); err != nil {
    		t.Skip("skipping test: gcc is missing")
    	}
    	tmp := t.TempDir()
    
    	oldRegs := runtime.SetIntArgRegs(abi.IntArgRegs)
    	defer runtime.SetIntArgRegs(oldRegs)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 31 16:31:35 UTC 2023
    - 32.5K bytes
    - Viewed (0)
  6. src/cmd/go/internal/script/cmds.go

    		err = cmd.Wait()
    		return stdoutBuf.String(), stderrBuf.String(), err
    	}
    	return wait, nil
    }
    
    // lookPath is (roughly) like exec.LookPath, but it uses the script's current
    // PATH to find the executable.
    func lookPath(s *State, command string) (string, error) {
    	var strEqual func(string, string) bool
    	if runtime.GOOS == "windows" || runtime.GOOS == "darwin" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  7. src/internal/testenv/testenv.go

    			goBuildErr = fmt.Errorf("%v: %w", cmd, err)
    			return
    		}
    		out = bytes.TrimSpace(out)
    		if len(out) == 0 {
    			goBuildErr = fmt.Errorf("%v: no tool reported", cmd)
    			return
    		}
    		if _, err := exec.LookPath(string(out)); err != nil {
    			goBuildErr = err
    			return
    		}
    
    		if platform.MustLinkExternal(runtime.GOOS, runtime.GOARCH, false) {
    			// We can assume that we always have a complete Go toolchain available.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:41:38 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  8. pkg/credentialprovider/plugin/plugin.go

    	registerMetrics()
    
    	for _, provider := range credentialProviderConfig.Providers {
    		// Considering Windows binary with suffix ".exe", LookPath() helps to find the correct path.
    		// LookPath() also calls os.Stat().
    		pluginBin, err := exec.LookPath(filepath.Join(pluginBinDir, provider.Name))
    		if err != nil {
    			if errors.Is(err, os.ErrNotExist) || errors.Is(err, exec.ErrNotFound) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 05 05:07:28 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  9. src/os/exec/exec.go

    // That is, if you run [LookPath]("go"), it will not successfully return
    // ./go on Unix nor .\go.exe on Windows, no matter how the path is configured.
    // Instead, if the usual path algorithms would result in that answer,
    // these functions return an error err satisfying [errors.Is](err, [ErrDot]).
    //
    // For example, consider these two program snippets:
    //
    //	path, err := exec.LookPath("prog")
    //	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:53 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  10. pkg/volume/iscsi/iscsi.go

    		readOnly:   readOnly,
    		exec:       exec,
    		deviceUtil: ioutil.NewDeviceHandler(ioutil.NewIOHandler()),
    	}
    
    	blockPath, err := mapper.GetGlobalMapPath(spec)
    	if err != nil {
    		return nil, fmt.Errorf("failed to get device path: %v", err)
    	}
    	mapper.MetricsProvider = volume.NewMetricsBlock(filepath.Join(blockPath, string(podUID)))
    
    	return mapper, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 23.4K bytes
    - Viewed (0)
Back to top