Fix shutdown to correctly close stdout and stop showing garbage characters on exit.

Patch by Matthew Sorrels

llvm-svn: 182539
This commit is contained in:
Michael Sartain 2013-05-22 23:31:28 +00:00
parent 43d8279ffd
commit 816cf1d88a
1 changed files with 7 additions and 1 deletions

View File

@ -1587,9 +1587,15 @@ Driver::MainLoop ()
}
}
editline_output_pty.CloseMasterFileDescriptor();
master_out_comm.SetReadThreadBytesReceivedCallback(NULL, NULL);
master_out_comm.Disconnect();
master_out_comm.ReadThreadStop();
out_comm_2.SetReadThreadBytesReceivedCallback(NULL, NULL);
out_comm_2.Disconnect();
out_comm_2.ReadThreadStop();
editline_output_pty.CloseMasterFileDescriptor();
reset_stdin_termios();
fclose (stdin);