| Index: vpython/venv/system_windows.go
|
| diff --git a/vpython/venv/system_windows.go b/vpython/venv/system_windows.go
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e4e7121fce0233f9443de41fdbcabff19603758a
|
| --- /dev/null
|
| +++ b/vpython/venv/system_windows.go
|
| @@ -0,0 +1,36 @@
|
| +// Copyright 2017 The LUCI Authors. All rights reserved.
|
| +// Use of this source code is governed under the Apache License, Version 2.0
|
| +// that can be found in the LICENSE file.
|
| +
|
| +package venv
|
| +
|
| +import (
|
| + "os"
|
| + "path/filepath"
|
| + "syscall"
|
| +
|
| + "github.com/luci/luci-go/common/errors"
|
| +)
|
| +
|
| +// longestGeneratedScriptPath returns the path of the longest generated script
|
| +// given a VirtualEnv root.
|
| +//
|
| +// Since Windows doesn't generate scripts, this is disabled.
|
| +func longestGeneratedScriptPath(basedir string) string { return "" }
|
| +
|
| +// venvBinPath resolves the path to a VirtualEnv binary.
|
| +func venvBinPath(root, name string) string {
|
| + return filepath.Join(root, "Scripts", name)
|
| +}
|
| +
|
| +func checkProcessRunning(pid int) error {
|
| + proc, err := os.FindProcess(pid)
|
| + if err != nil {
|
| + return errors.Annotate(err).Reason("failed to find process").Err()
|
| + }
|
| +
|
| + if err := proc.Signal(os.Signal(syscall.Signal(0))); err != nil {
|
| + return errors.Annotate(err).Reason("failed to signal process").Err()
|
| + }
|
| + return nil
|
| +}
|
|
|