summaryrefslogtreecommitdiff
path: root/source/Host/common/Terminal.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2015-07-03 16:57:06 +0000
committerEd Maste <emaste@FreeBSD.org>2015-07-03 16:57:06 +0000
commit5e95aa85bb660d45e9905ef1d7180b2678280660 (patch)
tree3c2e41c3be19b7fc7666ed45a5f91ec3b6e35f2a /source/Host/common/Terminal.cpp
parent12bd4897ff0678fa663e09d78ebc22dd255ceb86 (diff)
Diffstat (limited to 'source/Host/common/Terminal.cpp')
-rw-r--r--source/Host/common/Terminal.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/Host/common/Terminal.cpp b/source/Host/common/Terminal.cpp
index ca46eb0f744b..9f3abb75e919 100644
--- a/source/Host/common/Terminal.cpp
+++ b/source/Host/common/Terminal.cpp
@@ -180,20 +180,18 @@ TerminalState::Save (int fd, bool save_process_group)
bool
TerminalState::Restore () const
{
+#ifndef LLDB_DISABLE_POSIX
if (IsValid())
{
const int fd = m_tty.GetFileDescriptor();
-#ifndef LLDB_DISABLE_POSIX
if (TFlagsIsValid())
fcntl (fd, F_SETFL, m_tflags);
-#endif
#ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
if (TTYStateIsValid())
tcsetattr (fd, TCSANOW, m_termios_ap.get());
#endif // #ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
-#ifndef LLDB_DISABLE_POSIX
if (ProcessGroupIsValid())
{
// Save the original signal handler.
@@ -204,9 +202,9 @@ TerminalState::Restore () const
// Restore the original signal handler.
signal (SIGTTOU, saved_sigttou_callback);
}
-#endif
return true;
}
+#endif
return false;
}