dotcloud/docker — pull request #6955 by mheon (2014-07-10 13:04:38+00:00)
Title: Enable signal proxying with --tty option

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?