Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(507)

Delta Between Two Patch Sets: src/cmd/go/run.go

Issue 6903061: code review 6903061: cmd/go: handle os signals (Closed)
Left Patch Set: Created 11 years, 3 months ago
Right Patch Set: diff -r b1822aac85b7 https://go.googlecode.com/hg/ Created 11 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/cmd/go/build.go ('k') | src/cmd/go/signal.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package main 5 package main
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "os" 9 "os"
10 "os/exec" 10 "os/exec"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 return nil 77 return nil
78 } 78 }
79 79
80 // runStdin is like run, but connects Stdin. 80 // runStdin is like run, but connects Stdin.
81 func runStdin(cmdargs ...interface{}) { 81 func runStdin(cmdargs ...interface{}) {
82 cmdline := stringList(cmdargs...) 82 cmdline := stringList(cmdargs...)
83 cmd := exec.Command(cmdline[0], cmdline[1:]...) 83 cmd := exec.Command(cmdline[0], cmdline[1:]...)
84 cmd.Stdin = os.Stdin 84 cmd.Stdin = os.Stdin
85 cmd.Stdout = os.Stdout 85 cmd.Stdout = os.Stdout
86 cmd.Stderr = os.Stderr 86 cmd.Stderr = os.Stderr
87 startSigHandlers()
87 if err := cmd.Run(); err != nil { 88 if err := cmd.Run(); err != nil {
88 errorf("%v", err) 89 errorf("%v", err)
89 } 90 }
90 } 91 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b