Skip to content
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

2.4.x: avoid resetting the SIGINT handler unconditionally #1814

Merged
merged 2 commits into from
Mar 26, 2018

Conversation

a-palchikov
Copy link
Contributor

This happens unconditionally inside NewTeleport which makes any Go code using this to start an instance of teleport unable to trap SIGINT signal from a Go function.

Avoid resetting the SIGINT handler if it has not actually been set to ignore (Go's runtime respects SIG_IGN, btw, by not setting a handler).

ignore (Go's runtime respects SIG_IGN, by not setting a handler).

If the handler is reset unconditionally, no Go code can ask to be
notified of Interrupt signal as the system default handler obviously
knows nothing about Go code.
@a-palchikov a-palchikov merged commit e69b96c into branch/2.4 Mar 26, 2018
@a-palchikov a-palchikov deleted the dmitri/sigint-default-2.4.x branch March 26, 2018 20:43
@russjones russjones mentioned this pull request Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant