summaryrefslogtreecommitdiffstats
path: root/source/Host/common/Terminal.cpp
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-07-03 16:57:06 +0000
committeremaste <emaste@FreeBSD.org>2015-07-03 16:57:06 +0000
commit8037fa4ee916fa20b3c63cbf531f4ee7e1c76138 (patch)
tree3c2e41c3be19b7fc7666ed45a5f91ec3b6e35f2a /source/Host/common/Terminal.cpp
parentd61b076ede88b56f3372a55e7d1eac6a9d717120 (diff)
downloadFreeBSD-src-8037fa4ee916fa20b3c63cbf531f4ee7e1c76138.zip
FreeBSD-src-8037fa4ee916fa20b3c63cbf531f4ee7e1c76138.tar.gz
Import LLDB as of upstream SVN 241361 (git 612c075f)
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 ca46eb0..9f3abb7 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;
}
OpenPOWER on IntegriCloud