main: only exit on hangup if WINMAN_EXIT_ON_HANGUP env var is present
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>
Tue, 5 Sep 2017 13:50:19 +0000 (15:50 +0200)
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>
Tue, 5 Sep 2017 13:51:40 +0000 (15:51 +0200)
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
src/main.cpp

index e7b3c22..d944c24 100644 (file)
@@ -72,7 +72,8 @@ int display_event_callback(sd_event_source *evs, int /*fd*/, uint32_t events,
 
 error:
    sd_event_source_unref(evs);
-   exit(1);
+   if (getenv("WINMAN_EXIT_ON_HANGUP") != nullptr)
+      exit(1);
    return -1;
 }