Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[pantsd] Repair console interactivity in pantsd runs. #5352
Currently, in the case of pantsd-based runs, because we marshall stdio across a socket via the nailgun protocol we have no way for subprocesses to indicate tty settings like they normally would when directly connected to a tty device.
This causes interactive things like
Send the fully qualified path to the tty via the /dev filesystem as nailgun environment variables. If we detect the thin client as connected to the same tty on all 3 stdio descriptors, we'll now directly open the TTY in the pantsd-runner process and redirect stdio to it. This is inherited by subprocesses, too.
In order to ensure subprocesses potentially connected to the thin clients tty don't outlive the pants run, we now also send SIGINT on
Additionally, in the case of the python repl (which ignores
I've also ported
Both the python and scala repl cases behave as expected in the daemon.