From: Bert Vermeulen Date: Wed, 30 Oct 2013 13:39:59 +0000 (+0100) Subject: Actually exit when a fatal error is logged X-Git-Tag: sigrok-cli-0.5.0~81 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=608beef369c388837aedd07e345c2a6e6e1dfedf;p=sigrok-cli.git Actually exit when a fatal error is logged --- diff --git a/sigrok-cli.c b/sigrok-cli.c index 39cbb77..7f5cb58 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -1789,6 +1789,10 @@ static void logger(const gchar *log_domain, GLogLevelFlags log_level, fprintf(stderr, "%s\n", message); fflush(stderr); } + + if (log_level & (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL)) + exit(1); + } int main(int argc, char **argv)