Actually exit when a fatal error is logged
authorBert Vermeulen <bert@biot.com>
Wed, 30 Oct 2013 13:39:59 +0000 (14:39 +0100)
committerBert Vermeulen <bert@biot.com>
Wed, 30 Oct 2013 13:39:59 +0000 (14:39 +0100)
sigrok-cli.c

index 39cbb777be2172d8e207607c418b9c367cfec887..7f5cb5817e6428678cc2338f893e371d2b3a52fe 100644 (file)
@@ -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)