1
0
forked from Mirror/wren

Reset the TTY before closing the underlying stdin stream.

This commit is contained in:
Bob Nystrom
2016-05-27 06:59:43 -07:00
parent 33cf8f7b31
commit 6ece314863

View File

@ -52,6 +52,9 @@ static bool isStdinRaw = false;
// Frees all resources related to stdin.
static void shutdownStdin()
{
// Reset the TTY before we close the stdin stream.
uv_tty_reset_mode();
if (stdinStream != NULL)
{
uv_close((uv_handle_t*)stdinStream, NULL);
@ -70,8 +73,6 @@ static void shutdownStdin()
wrenReleaseHandle(getVM(), stdinOnData);
stdinOnData = NULL;
}
uv_tty_reset_mode();
}
void ioShutdown()