This change makes it so that everything works properly even if the user ran with docker -ti.
socat detects whether stdout is a TTY and "helpfully" stores and restores TTY settings with tcgetattr() and tcsetattr(). Upon the call to tcsetattr(), socat receives signal 22, SIGTTOU. Docker (or some other parent process) seems to set the signal disposition for SIGTTOU to "terminate", and thus socat exits with status 150 (128 + 22). This causes SENT_NODES not to be updated. All that because the user thought they might want to run with docker -ti to watch the output while the cluster booted up.
Of course, the answer could be "don't run with --tty", but we don't actually need socat's stdout and this change prevents the user from shooting their foot.
This change makes it so that everything works properly even if the user ran with
docker -ti
.socat
detects whether stdout is a TTY and "helpfully" stores and restores TTY settings withtcgetattr()
andtcsetattr()
. Upon the call totcsetattr()
, socat receives signal 22, SIGTTOU. Docker (or some other parent process) seems to set the signal disposition for SIGTTOU to "terminate", and thus socat exits with status 150 (128 + 22). This causesSENT_NODES
not to be updated. All that because the user thought they might want to run withdocker -ti
to watch the output while the cluster booted up.Of course, the answer could be "don't run with --tty", but we don't actually need
socat
's stdout and this change prevents the user from shooting their foot.