Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: vpython/venv/system_windows.go

Issue 2699063004: vpython: Add VirtualEnv creation package. (Closed)
Patch Set: bootstrap straight out of tempdir Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « vpython/venv/system_posix.go ('k') | vpython/venv/test_data/README.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file.
4
5 package venv
6
7 import (
8 "os"
9 "path/filepath"
10 "syscall"
11
12 "github.com/luci/luci-go/common/errors"
13 )
14
15 // longestGeneratedScriptPath returns the path of the longest generated script
16 // given a VirtualEnv root.
17 //
18 // Since Windows doesn't generate scripts, this is disabled.
19 func longestGeneratedScriptPath(basedir string) string { return "" }
20
21 // venvBinPath resolves the path to a VirtualEnv binary.
22 func venvBinPath(root, name string) string {
23 return filepath.Join(root, "Scripts", name)
24 }
25
26 func checkProcessRunning(pid int) error {
27 proc, err := os.FindProcess(pid)
28 if err != nil {
29 return errors.Annotate(err).Reason("failed to find process").Err ()
30 }
31
32 if err := proc.Signal(os.Signal(syscall.Signal(0))); err != nil {
33 return errors.Annotate(err).Reason("failed to signal process").E rr()
34 }
35 return nil
36 }
OLDNEW
« no previous file with comments | « vpython/venv/system_posix.go ('k') | vpython/venv/test_data/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698