Commit 08ab43ec authored by Mohit Agarwal's avatar Mohit Agarwal Committed by Russ Cox

cmd/pprof: exit with non-zero status code on error

Set the status code in case of error.

Fixes #11510

Change-Id: If461c30a1f6d2275539f33a2eabd7b19bbfa411d
Reviewed-on: https://go-review.googlesource.com/16718Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
parent 3fb9e087
......@@ -27,6 +27,7 @@ func main() {
var extraCommands map[string]*commands.Command // no added Go-specific commands
if err := driver.PProf(flags{}, fetch.Fetcher, symbolize, new(objTool), plugin.StandardUI(), extraCommands); err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(2)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment