From b203d4b43cb498aa7670c091b0d10aea456f24ed Mon Sep 17 00:00:00 2001 From: psychocrypt Date: Thu, 30 Nov 2017 22:04:47 +0100 Subject: add environment variable `XMRSTAK_NOWAIT` - add documentation - add environment variable `XMRSTAK_NOWAIT` --- xmrstak/misc/console.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'xmrstak/misc/console.cpp') diff --git a/xmrstak/misc/console.cpp b/xmrstak/misc/console.cpp index 8de5948..980760e 100644 --- a/xmrstak/misc/console.cpp +++ b/xmrstak/misc/console.cpp @@ -222,8 +222,13 @@ void printer::print_str(const char* str) #ifdef _WIN32 void win_exit(size_t code) { - printer::inst()->print_str("Press any key to exit."); - get_key(); + size_t envSize = 0; + getenv_s(&envSize, nullptr, 0, "XMRSTAK_NOWAIT"); + if(envSize == 0) + { + printer::inst()->print_str("Press any key to exit."); + get_key(); + } std::exit(code); } -- cgit v1.1