]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/pprof: exit with non-zero status code on error
authorMohit Agarwal <mohit@sdf.org>
Fri, 6 Nov 2015 17:57:01 +0000 (23:27 +0530)
committerRuss Cox <rsc@golang.org>
Sat, 5 Dec 2015 04:09:15 +0000 (04:09 +0000)
Set the status code in case of error.

Fixes #11510

Change-Id: If461c30a1f6d2275539f33a2eabd7b19bbfa411d
Reviewed-on: https://go-review.googlesource.com/16718
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/pprof/pprof.go

index 44f4f6cb722a13073049e6520344bba38b694c0d..2b20f1da771aa19016cec6d707d956b590997f68 100644 (file)
@@ -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)
        }
 }