summaryrefslogtreecommitdiff
path: root/src/rebar_dist_utils.erl
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2019-01-31 09:22:23 -0500
committerFred Hebert <mononcqc@ferd.ca>2019-01-31 09:35:52 -0500
commit1b6e3ac9c0e3b77215b119427b9a4d530cb08e1d (patch)
treeefb151a25307c3f2c13b0cd4034d5b9b2ceb003f /src/rebar_dist_utils.erl
parent036e30ba2bcb7643c5a1603ff03232769b65c7a4 (diff)
Unhang logger when swapping the TTY in shell
Starting with OTP-21.2.3, some output appears to be sent to the shell while we're taking down the TTY, which ends up stalling the whole log flow for the default handler. I don't have proof but suspect this is due to the system logging going directly from the ERTS runtime to the logger, which may be trigger when we kill the TTY driver. This patch makes it so whenever we detect that logger is active, we save the default config, disable the default logger, and only then we can kill the TTY driver. Once the driver is started and all the group leaders have been rewritten, the default logger is re-added. This all takes place _before_ the logger configuration is updated as part of booting apps, and the change should be fully backwards compatible.
Diffstat (limited to 'src/rebar_dist_utils.erl')
0 files changed, 0 insertions, 0 deletions