Skip to content

Conversation

@mheon
Copy link
Contributor

@mheon mheon commented Jul 10, 2014

Fixes #5547

At present, signal proxying doesn't work when --tty is specified during container creation. This patch removes the checks that would otherwise prevent this from happening.

There are a few quirks associated with this. Most notable, SIGTTIN, SIGTTOU, and SIGTSTP are ignored if a TTY is attached. This doesn't seem to be worth fixing - those signals are mostly related to TTYs already, so the pseudo-TTY attached to the container can handle them. Instead, I documented the behavior to prevent confusion.

Also notably, the terminal hijack handler will register a separate signal handler for SIGINT, so sending SIGINT will close the client instead of proxying the signal. This could be fixed, but this would prevent control-C from stopping terminal hijack, which could be undesirable?

@vieux
Copy link
Contributor

vieux commented Jul 10, 2014

ping @crosbymichael @tiborvass @unclejack

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TTY

@huslage
Copy link
Contributor

huslage commented Jul 15, 2014

Should be "proxy" not "Proxify"

@unclejack
Copy link
Contributor

I agree that this is something we probably want to change. However, @mheon, could you tell us how this changes behavior for various use cases and what this would break, please?

@mheon
Copy link
Contributor Author

mheon commented Jul 16, 2014

Fixed the Docs issues (capitalization of TTY, proxify changed to proxy)

@unclejack, this should not significant change or break existing use cases. Signals the client would currently ignore (or crash upon receiving) will be proxied to the container. The biggest difference I can see will be that signal 15 will be send to the container, not the client, so it is no longer a reliable way to cause a graceful exit of the client. Signal 2 is handled separately by the TTY handler, so SIGINT and Control-C can be substituted for that case.

@crosbymichael crosbymichael merged commit 3b3f0fa into moby:master Jul 16, 2014
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.

man page inaccuracy about --sig-proxy and --tty

7 participants