mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-07 04:24:22 +00:00
Clean up summary slightly better on exit.
This commit is contained in:
parent
18c6b496c3
commit
8b2118b143
23
cgminer.c
23
cgminer.c
@ -2735,6 +2735,7 @@ static bool get_upstream_work(struct work *work, CURL *curl)
|
|||||||
static void disable_curses(void)
|
static void disable_curses(void)
|
||||||
{
|
{
|
||||||
if (curses_active_locked()) {
|
if (curses_active_locked()) {
|
||||||
|
use_curses = false;
|
||||||
curses_active = false;
|
curses_active = false;
|
||||||
leaveok(logwin, false);
|
leaveok(logwin, false);
|
||||||
leaveok(statuswin, false);
|
leaveok(statuswin, false);
|
||||||
@ -6454,12 +6455,15 @@ void print_summary(void)
|
|||||||
log_print_status(cgpu);
|
log_print_status(cgpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt_shares)
|
if (opt_shares) {
|
||||||
applog(LOG_WARNING, "Mined %d accepted shares of %d requested\n", total_accepted, opt_shares);
|
applog(LOG_WARNING, "Mined %d accepted shares of %d requested\n", total_accepted, opt_shares);
|
||||||
fflush(stdout);
|
if (opt_shares > total_accepted)
|
||||||
|
applog(LOG_WARNING, "WARNING - Mined only %d shares of %d requested.", total_accepted, opt_shares);
|
||||||
|
}
|
||||||
|
applog(LOG_WARNING, "");
|
||||||
|
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
if (opt_shares > total_accepted)
|
fflush(stdout);
|
||||||
applog(LOG_WARNING, "WARNING - Mined only %d shares of %d requested.", total_accepted, opt_shares);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clean_up(void)
|
static void clean_up(void)
|
||||||
@ -6483,17 +6487,10 @@ static void clean_up(void)
|
|||||||
|
|
||||||
void quit(int status, const char *format, ...)
|
void quit(int status, const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
clean_up();
|
clean_up();
|
||||||
|
|
||||||
if (format) {
|
if (format)
|
||||||
va_start(ap, format);
|
log_error(format);
|
||||||
vfprintf(stderr, format, ap);
|
|
||||||
va_end(ap);
|
|
||||||
}
|
|
||||||
fprintf(stderr, "\n");
|
|
||||||
fflush(stderr);
|
|
||||||
|
|
||||||
#if defined(unix)
|
#if defined(unix)
|
||||||
if (forkpid > 0) {
|
if (forkpid > 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user