summaryrefslogtreecommitdiff
path: root/src/cmd/go/run.go
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2012-12-14 17:33:59 +1100
committerAlex Brainman <alex.brainman@gmail.com>2012-12-14 17:33:59 +1100
commit331a181f595bd28889a2eeef22fe2410e9e8626f (patch)
tree0c7a3aad31cde1f9222293d76f93848cf1f109fc /src/cmd/go/run.go
parent634ab3f25fd5862224c2f769997fa0ea7e164189 (diff)
downloadgo-331a181f595bd28889a2eeef22fe2410e9e8626f.tar.gz
cmd/go: handle os signals
Ignore signals during "go run" and wait for running child process to exit. Stop executing further tests during "go test", wait for running tests to exit and report error exit code. Original CL 6351053 by dfc. Fixes issue 3572. Fixes issue 3581. R=golang-dev, dave, rsc CC=golang-dev https://codereview.appspot.com/6903061
Diffstat (limited to 'src/cmd/go/run.go')
-rw-r--r--src/cmd/go/run.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/go/run.go b/src/cmd/go/run.go
index 0f41fa61b..88f57617e 100644
--- a/src/cmd/go/run.go
+++ b/src/cmd/go/run.go
@@ -84,6 +84,7 @@ func runStdin(cmdargs ...interface{}) {
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
+ startSigHandlers()
if err := cmd.Run(); err != nil {
errorf("%v", err)
}