Commit 7f1d62dc authored by Robert Griesemer's avatar Robert Griesemer

spec: clarify when a program exits

Fixes #8023.

LGTM=rsc
R=r, iant, ken, rsc
CC=golang-codereviews
https://golang.org/cl/98340043
parent 5b76f0ce
<!--{ <!--{
"Title": "The Go Programming Language Specification", "Title": "The Go Programming Language Specification",
"Subtitle": "Version of May 14, 2014", "Subtitle": "Version of May 19, 2014",
"Path": "/ref/spec" "Path": "/ref/spec"
}--> }-->
...@@ -5979,7 +5979,7 @@ func main() { … } ...@@ -5979,7 +5979,7 @@ func main() { … }
<p> <p>
Program execution begins by initializing the main package and then Program execution begins by initializing the main package and then
invoking the function <code>main</code>. invoking the function <code>main</code>.
When the function <code>main</code> returns, the program exits. When that function invocation returns, the program exits.
It does not wait for other (non-<code>main</code>) goroutines to complete. It does not wait for other (non-<code>main</code>) goroutines to complete.
</p> </p>
......
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