- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 87 for subprocess (0.28 sec)
-
src/cmd/go/internal/base/env.go
"fmt" "os" "path/filepath" "runtime" ) // AppendPWD returns the result of appending PWD=dir to the environment base. // // The resulting environment makes os.Getwd more efficient for a subprocess // running in dir, and also improves the accuracy of paths relative to dir // if one or more elements of dir is a symlink. func AppendPWD(base []string, dir string) []string { // POSIX requires PWD to be absolute.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 25 16:40:59 UTC 2022 - 1.3K bytes - Viewed (0) -
src/cmd/go/help_test.go
var fixDocs = flag.Bool("fixdocs", false, "if true, update alldocs.go") func TestDocsUpToDate(t *testing.T) { testenv.MustHaveGoBuild(t) if !*fixDocs { t.Parallel() } // We run 'go help documentation' as a subprocess instead of // calling help.Help directly because it may be sensitive to // init-time configuration cmd := testenv.Command(t, testGo, "help", "documentation") // Unset GO111MODULE so that the 'go get' section matches
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 28 15:45:49 UTC 2023 - 1.6K bytes - Viewed (0) -
test/chan/sieve1.go
} } } // The prime sieve: Daisy-chain Filter processes together. func Sieve(primes chan<- int) { ch := make(chan int) // Create a new channel. go Generate(ch) // Start Generate() as a subprocess. for { // Note that ch is different on each iteration. prime := <-ch primes <- prime ch1 := make(chan int) go Filter(ch, ch1, prime) ch = ch1 } } func main() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Feb 19 06:44:02 UTC 2012 - 1.5K bytes - Viewed (0) -
src/cmd/go/internal/toolchain/exec.go
os.Setenv(targetEnv, gotoolchain) if dir == "" { os.Unsetenv("GOROOT") } else { os.Setenv("GOROOT", dir) } // On Windows, there is no syscall.Exec, so the best we can do // is run a subprocess and exit with the same status. // Doing the same on Unix would be a problem because it wouldn't // propagate signals and such, but there are no signals on Windows. // We also use the exec case when GODEBUG=gotoolchainexec=0,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 19 14:42:39 UTC 2023 - 1.6K bytes - Viewed (0) -
configure.py
def run_shell(cmd, allow_non_zero=False, stderr=None): if stderr is None: stderr = sys.stdout if allow_non_zero: try: output = subprocess.check_output(cmd, stderr=stderr) except subprocess.CalledProcessError as e: output = e.output else: output = subprocess.check_output(cmd, stderr=stderr) return output.decode('UTF-8').strip() def cygpath(path): """Convert path from posix to windows."""
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Jun 10 04:32:44 UTC 2024 - 53.8K bytes - Viewed (1) -
src/runtime/crash_unix_test.go
} defer pr.Close() // Wait for "x\nx\n" to indicate almost-readiness. buf := make([]byte, 4) _, err = io.ReadFull(pr, buf) if err != nil || string(buf) != "x\nx\n" { t.Fatal("subprocess failed; output:\n", string(buf)) } // The child blockers print "x\n" and then block on a lock. Receiving // those bytes only indicates that the child is _about to block_. Since
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 20:11:47 UTC 2023 - 9.2K bytes - Viewed (0) -
src/os/exec/exec_posix_test.go
link := filepath.Join(t.TempDir(), "link") if err := os.Symlink(cwd, link); err != nil { t.Fatal(err) } // Now link is another equally-valid name for cwd. If we set Dir to one and // PWD to the other, the subprocess should report the PWD version. cases := []struct { name string dir string pwd string }{ {name: "original PWD", pwd: cwd}, {name: "link PWD", pwd: link},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 13 20:21:32 UTC 2022 - 6.8K bytes - Viewed (0) -
src/internal/testenv/exec.go
// for the resulting error. func MustHaveExec(t testing.TB) { tryExecOnce.Do(func() { tryExecErr = tryExec() }) if tryExecErr != nil { t.Skipf("skipping test: cannot exec subprocess on %s/%s: %v", runtime.GOOS, runtime.GOARCH, tryExecErr) } } var ( tryExecOnce sync.Once tryExecErr error ) func tryExec() error { switch runtime.GOOS { case "wasip1", "js", "ios":
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 27 17:53:23 UTC 2023 - 7.5K bytes - Viewed (0) -
src/cmd/go/terminal_test.go
if err != nil { t.Fatal(err) } t.Logf("running %s", cmd) err = cmd.Start() if err != nil { t.Fatalf("starting subprocess: %s", err) } w.Close() t.Cleanup(func() { stdin.Close() if err := cmd.Wait(); err != nil { t.Errorf("suprocess failed with: %s", err) } }) buf := make([]byte, 2) n, err := io.ReadFull(r, buf)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 07 18:18:50 UTC 2022 - 3.3K bytes - Viewed (0) -
src/runtime/abi_test.go
type TintPointer struct { p *Tint } func (*TintPointer) m() {} func TestFinalizerRegisterABI(t *testing.T) { testenv.MustHaveExec(t) // Actually run the test in a subprocess because we don't want // finalizers from other tests interfering. if os.Getenv("TEST_FINALIZER_REGABI") != "1" { cmd := testenv.CleanCmdEnv(exec.Command(os.Args[0], "-test.run=^TestFinalizerRegisterABI$", "-test.v"))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 3.1K bytes - Viewed (0)