-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
runtime: Windows service lifecycle events behave incorrectly when called within a golang environment [1.15 backport] #40412
Comments
Change https://golang.org/cl/244959 mentions this issue: |
Pinging @dmitshur - we would like the approval of this change to be back-ported. Thank you. Alex |
Approved per discussion in a release meeting. This is fixing a serious issue without a workaround. This backport applies to both 1.15 (this issue) and 1.14 (#40411). |
The fix is at https://go-review.googlesource.com/c/go/+/244959/ and gave it +2. How do we get it submitted (my submit button is disabled)? Thank you. Alex |
From https://golang.org/wiki/MinorReleases#making-cherry-pick-cls:
I'll take care of it now. |
Closed by merging b1253d2 to release-branch.go1.15. |
The service handler needs to handle CTRL+C-like events -- including those sent by the service manager itself -- using the default Windows implementation if no signal handler from Go is already listening to those events. Ordinarily, the signal handler would call exit(2), but we actually need to allow this to be passed onward to the service handler. So, we detect if we're in a service and skip calling exit(2) in that case, just like we do for shared libraries. Updates #40167. Updates #40074. Fixes #40412. Change-Id: Ia77871737a80e1e94f85b02d26af1fd2f646af96 Reviewed-on: https://go-review.googlesource.com/c/go/+/244959 Run-TryBot: Jason A. Donenfeld <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Alex Brainman <[email protected]>
@alexbrainman requested issue #40167 to be considered for backport to the next 1.15 minor release.
The text was updated successfully, but these errors were encountered: