]> Cypherpunks repositories - gostls13.git/commit
runtime: make return from main wait for active panic
authorRuss Cox <rsc@golang.org>
Fri, 15 Feb 2013 19:48:35 +0000 (14:48 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 15 Feb 2013 19:48:35 +0000 (14:48 -0500)
commitc8214c78bd2f8ad308119dc2344634993ab499c8
tree210fb541d916d841729581ea73ffd16366077b99
parent2d4164596f3bd798996732aaa01b95e70f91e8a8
runtime: make return from main wait for active panic

Arguably if this happens the program is buggy anyway,
but letting the panic continue looks better than interrupting it.
Otherwise things like this are possible, and confusing:

$ go run x.go
panic: $ echo $?
0
$

Fixes #3934.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7322083
src/pkg/runtime/proc.c