-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor some code in process.go #2251
Conversation
This is intended to be a no-op refactor. `errors.As` should work in more circumstances than the previous type assertion. Other than that, the order of the edge and main cases have been inverted, and the error message has been tweaked a little.
This means the goroutine is spun up when the context is nil when previously it would not be. This is fine because they are pretty cheap, and also it it is highly unlikely that the context will be nil at runtime.
8c3fda4
to
d471235
Compare
@@ -43,6 +43,10 @@ var signalMap = map[string]Signal{ | |||
"SIGTERM": SIGTERM, | |||
} | |||
|
|||
var ErrNotWaitStatus = errors.New( | |||
"unimplemented for systems where exec.ExitError.Sys() is not syscall.WaitStatus", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error message is not helpful to users, so should not really be exposed except under debug. However, it is more or less what was there before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 love your work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
More details available commit by commit