FC Updates from BitShares and myself #21
1 changed files with 9 additions and 15 deletions
|
|
@ -105,20 +105,12 @@ void cli::run()
|
||||||
}
|
}
|
||||||
catch ( const fc::eof_exception& e )
|
catch ( const fc::eof_exception& e )
|
||||||
{
|
{
|
||||||
if( _getline_thread )
|
_getline_thread = nullptr;
|
||||||
{
|
|
||||||
_getline_thread->quit();
|
|
||||||
_getline_thread = nullptr;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
catch ( const fc::canceled_exception& e )
|
catch ( const fc::canceled_exception& e )
|
||||||
{
|
{
|
||||||
if( _getline_thread )
|
_getline_thread = nullptr;
|
||||||
{
|
|
||||||
_getline_thread->quit();
|
|
||||||
_getline_thread = nullptr;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,11 +134,7 @@ void cli::run()
|
||||||
{
|
{
|
||||||
if (e.code() == fc::canceled_exception_code)
|
if (e.code() == fc::canceled_exception_code)
|
||||||
{
|
{
|
||||||
if( _getline_thread )
|
_getline_thread = nullptr;
|
||||||
{
|
|
||||||
_getline_thread->quit();
|
|
||||||
_getline_thread = nullptr;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
std::cout << e.to_detail_string() << "\n";
|
std::cout << e.to_detail_string() << "\n";
|
||||||
|
|
@ -257,6 +245,10 @@ static int cli_check_secret(const char *source)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* Indicates whether CLI is quitting after got a SIGINT signal.
|
||||||
|
* In order to be used by editline which is C-style, this is a global variable.
|
||||||
|
*/
|
||||||
static int cli_quitting = false;
|
static int cli_quitting = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -292,6 +284,8 @@ void cli::start()
|
||||||
static fc::thread getline_thread("getline");
|
static fc::thread getline_thread("getline");
|
||||||
_getline_thread = &getline_thread;
|
_getline_thread = &getline_thread;
|
||||||
|
|
||||||
|
cli_quitting = false;
|
||||||
|
|
||||||
cli_commands() = get_method_names(0);
|
cli_commands() = get_method_names(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue