Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
os: document that Exit does not run deferred calls #4101
What steps will reproduce the problem? 1. Run this program http://play.golang.org/p/CL9yMyhXA_ 2. The defer fmt.Println is never executed 3. Why? The spec says that defer will be executed at the end of the function. What is the expected output? What do you see instead? The behavior is good, but the documentation should mention this case. runtimer.Goexit() which could have a similar behavior specifies that it calls all the deferred calls. We should tell that os.Exit doesn't call them. Please use labels and text to provide additional information.
This issue was closed.