Merge pull request #23865 from rhcarvalho/unify-signal-handling
Automatic merge from submit-queue
Unify termination signal handling across platforms
The signals are used to ensure proper execution of cleaning up actions to restore a terminal in:
- [pkg/kubectl/cmd/attach.go#L163-L226](https://github.com/kubernetes/kubernetes/blob/b8d000853edbfe3d0d9bcd85e8e511a98b6ac6af/pkg/kubectl/cmd/attach.go#L163-L226)
- [pkg/kubectl/cmd/util/editor/editor.go#L112-L137](https://github.com/kubernetes/kubernetes/blob/b8d000853edbfe3d0d9bcd85e8e511a98b6ac6af/pkg/kubectl/cmd/util/editor/editor.go#L112-L137)
All supported platforms can handle the same set of signals we're interested in, thus we don't need build contraints to use a set of signals on Linux, while restricting ourselves to only SIGINT on Darwin and Windows.
According to the documentation of os/signal, similar to SIGINT and SIGTERM, SIGHUP causes the program to exit, therefore add it to the list of handled signals.
The fist commit is part of #23643.
Showing
Please
register
or
sign in
to comment