New issue
Advanced search Search tips

Issue 843342 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Avoid use of os.Exit

Project Member Reported by asanka@chromium.org, May 15 2018

Issue description

from feiling:

os.Exit() in main will bypass defer actions. So probably we should one of the solutions mentioned in https://stackoverflow.com/questions/27629380/how-to-exit-a-go-program-honoring-deferred-calls
 

Comment 1 by asanka@chromium.org, May 15 2018

Status: WontFix (was: Assigned)
I looked and the os.Exit() is in the main() func. Defer processing is scoped to a single function, and since there are not defers scheduled in main(), the os.Exit() doesn't bypass defer processing.

Sign in to add a comment