-
k8s-merge-robot authored
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.
c66b2b4e