aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-05-31 12:13:03 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-05-31 12:15:06 +0100
commit1aae39dff27f6e7e48ae0a2d8ef2fd612e127824 (patch)
treef8b83cb344cc9da678e59dd7b8b455d94a172c6e
parentMerge pull request #3251 (diff)
downloadmonero-1aae39dff27f6e7e48ae0a2d8ef2fd612e127824.tar.xz
daemon: fix readline interfering with std::cerr usage
Once readline is initialized, std::cerr's operator<< will output a 0xff byte for unknown reasons.
-rw-r--r--src/daemon/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp
index 49494e889..fd70c367c 100644
--- a/src/daemon/main.cpp
+++ b/src/daemon/main.cpp
@@ -262,6 +262,9 @@ int main(int argc, char const * argv[])
}
else
{
+#ifdef HAVE_READLINE
+ rdln::suspend_readline pause_readline;
+#endif
std::cerr << "Unknown command: " << command.front() << std::endl;
return 1;
}